Table of Contents

Class Order

Namespace
ATAS.DataFeedsCore
Assembly
ATAS.DataFeedsCore.dll

Represents an order for trading on a financial exchange.

public class Order : IEntity
Inheritance
object
Order
Implements
Extension Methods

Constructors

Order()

public Order()

Properties

AccountID

Gets or sets the ID of the account associated with this order.

[Browsable(false)]
public string? AccountID { get; set; }

Property Value

string

Remarks

This property represents the ID of the account to which this order is associated.

AmountBefore

Gets or sets the amount before the order.

[Browsable(false)]
public decimal AmountBefore { get; set; }

Property Value

decimal

AutoCancel

Gets or sets a value indicating whether the order must be cancelled on position closed or reverted.

public bool AutoCancel { get; set; }

Property Value

bool

BrokerCancellationReason

The broker's explanation for removing the order, when supplied.

        <p>Not in ATAS 8.0.15 yet: available from the next version.</p>
[Browsable(false)]
public string? BrokerCancellationReason { get; set; }

Property Value

string

Canceled

Gets a value indicating whether the order is canceled.

[Browsable(false)]
public bool Canceled { get; }

Property Value

bool

CancellationRequestedByAtas

Whether ATAS requested cancellation of this order, including cancel/replace.

        <p>Not in ATAS 8.0.15 yet: available from the next version.</p>
[Browsable(false)]
public bool CancellationRequestedByAtas { get; set; }

Property Value

bool

Comment

Gets or sets the comment for the order.

public string? Comment { get; set; }

Property Value

string

Remarks

This property represents an optional comment or note associated with the order.

Direction

Gets or sets the direction of the order.

public OrderDirections Direction { get; set; }

Property Value

OrderDirections

Remarks

This property represents the direction of the order, such as buy or sell.

EntityType

Gets the type of the entity.

[Browsable(false)]
public EntityType EntityType { get; }

Property Value

EntityType

ExpiryDate

Gets or sets the expiry date of the order.

public DateTime? ExpiryDate { get; set; }

Property Value

DateTime?

Remarks

If the value is null, the order will be valid until it is manually canceled. If the value is set to Today, the order will be valid for the current trading session. If the value is set to MinValue, the order will be of the FOK (Fill or Kill) type.

ExtId

Gets or sets the additional identifier for the order.

[Browsable(false)]
public long ExtId { get; set; }

Property Value

long

ExtendedOptions

Allows setting special options for the order. Use CreateMarketOrderFlagsObject() and similar methods obtained by calling the GetSecurityTradingOptions(Security) method to get the object that you can populate and pass here.

[Browsable(false)]
public OrderExtendedOptions? ExtendedOptions { get; set; }

Property Value

OrderExtendedOptions

ExtendedOptionsFlags

Gets or sets the flags representation of the ExtendedOptions.

Added in ATAS 8.0.15.

[Browsable(false)]
public int? ExtendedOptionsFlags { get; set; }

Property Value

int?

Id

Gets or sets the ID of the order on the exchange.

[Browsable(false)]
public string? Id { get; set; }

Property Value

string

IsAttached

Gets or sets a value indicating whether the order is attached to another order.

[Browsable(false)]
public bool? IsAttached { get; set; }

Property Value

bool?

IsInPosition

Gets or sets a value indicating whether the order is in a position.

[Browsable(false)]
public bool IsInPosition { get; set; }

Property Value

bool

Latency

Returns the time spent between sending the order to the server and receiving a response about it's registration or cancellation.

[Browsable(false)]
public TimeSpan Latency { get; set; }

Property Value

TimeSpan

OCOGroup

Gets or sets the OCO (One-Cancels-the-Other) group for the order.

public string? OCOGroup { get; set; }

Property Value

string

Remarks

This property represents the OCO group to which the order belongs, indicating that it is part of an OCO pair.

Parent

Gets or sets the parent object associated with this order.

[Browsable(false)]
public object? Parent { get; set; }

Property Value

object

Portfolio

Gets or sets the portfolio associated with this order.

public Portfolio? Portfolio { get; set; }

Property Value

Portfolio

Remarks

This property represents the portfolio to which this order belongs.

Price

Gets or sets the price of the order.

public decimal Price { get; set; }

Property Value

decimal

Remarks

This property represents the price at which the order will be executed.

QuantityToFill

Gets or sets the volume (quantity) to be filled for the order.

public decimal QuantityToFill { get; set; }

Property Value

decimal

Remarks

This property represents the quantity of the security to be bought or sold in the order.

QuoteVolume

Gets or sets the quote volume associated with the order.

[Browsable(false)]
public decimal? QuoteVolume { get; set; }

Property Value

decimal?

Route

Gets or sets the routing information for the order.

public string? Route { get; set; }

Property Value

string

Remarks

This property represents the routing information for the order, which specifies how the order will be sent to the exchange or market.

RoutedAccountId

Gets or sets the routed account ID for this order.

[Browsable(false)]
public string? RoutedAccountId { get; set; }

Property Value

string

Remarks

The routed account ID is used to track the specific account to which the order is routed.

Security

Gets or sets the security associated with this order.

public Security? Security { get; set; }

Property Value

Security

Remarks

This property represents the security (e.g., stock, bond, etc.) to which this order is related.

SecurityId

Gets or sets the ID of the security associated with this order.

[Browsable(false)]
public string? SecurityId { get; set; }

Property Value

string

State

Gets or sets the current state of the order.

[Browsable(false)]
public OrderStates State { get; set; }

Property Value

OrderStates

Remarks

This property represents the current state of the order, such as active, done, failed, etc.

Time

Gets or sets the timestamp of when the order was created or modified.

[Browsable(false)]
public DateTime Time { get; set; }

Property Value

DateTime

Remarks

This property represents the timestamp indicating when the order was created or last modified.

TimeInForce

Gets or sets the time in force for the order.

public TimeInForce TimeInForce { get; set; }

Property Value

TimeInForce

Remarks

The time in force determines how long the order will remain active before it is executed or canceled.

TriggerPrice

Gets or sets the trigger price of the order.

public decimal TriggerPrice { get; set; }

Property Value

decimal

Remarks

This property represents the trigger price for the order, which is used in certain types of orders (e.g., stop-loss).

TriggerPriceType

Gets or sets the type of trigger price associated with the order.

public TriggerPriceType TriggerPriceType { get; set; }

Property Value

TriggerPriceType

Remarks

This property represents the type of trigger price used in certain types of orders (e.g., stop-loss, stop-limit).

Type

Gets or sets the type of the order.

public OrderTypes Type { get; set; }

Property Value

OrderTypes

Remarks

This property represents the type of the order, such as market order, limit order, etc.

Unfilled

Gets the remaining unfilled volume of the order.

[Browsable(false)]
public decimal Unfilled { get; set; }

Property Value

decimal

Remarks

This property represents the remaining quantity of the order that is yet to be executed.

UserExtId

Gets or sets the user's identifier associated with the order.

[Browsable(false)]
public long UserExtId { get; set; }

Property Value

long

WasActive

Gets or sets a value indicating whether the order was active.

[Browsable(false)]
public bool WasActive { get; set; }

Property Value

bool

Methods

Clone()

Creates a shallow copy of the current order.

public Order Clone()

Returns

Order

A new instance of the Order class that is a shallow copy of the current order.

OnPropertyChanged(string)

Raises the PropertyChanged event with the specified property name.

protected void OnPropertyChanged(string name)

Parameters

name string

The name of the property that has changed.

ToString()

Returns a string that represents the current order.

public override string ToString()

Returns

string

A string representation of the order.

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler