Class Order
- Namespace
- StockSharp.BusinessEntities
- Assembly
- StockSharp.BusinessEntities.dll
Order.
[DataContract]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Order", Description = "InfoAboutOrder")]
public class Order : NotifiableObject, IOrderMessage, ISecurityIdMessage, ILocalTimeMessage, IServerTimeMessage, IComplexIdMessage, IGeneratedMessage, ISeqNumMessage, ICurrencyMessage, ISystemMessage
- Inheritance
-
Order
- Implements
- Extension Methods
Constructors
Order()
Initializes a new instance of the Order.
public Order()
Properties
AveragePrice
Average execution price.
[DataMember]
public decimal? AveragePrice { get; set; }
Property Value
Balance
Order contracts balance.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Balance", Description = "OrderBalance", GroupName = "General")]
public decimal Balance { get; set; }
Property Value
BoardId
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "OrderBoardId", Description = "OrderBoardIdDesc", GroupName = "General")]
public string BoardId { get; set; }
Property Value
BrokerCode
Broker firm code.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Broker", Description = "BrokerCode", GroupName = "General")]
public string BrokerCode { get; set; }
Property Value
CancelledTime
Cancelled time.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Cancel", Description = "CancelledTime", GroupName = "General")]
public DateTimeOffset? CancelledTime { get; set; }
Property Value
ClientCode
Client code assigned by the broker.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ClientCode", Description = "ClientCodeDesc", GroupName = "General")]
public string ClientCode { get; set; }
Property Value
Comment
Placed order comment.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Comment", Description = "OrderComment", GroupName = "General")]
public string Comment { get; set; }
Property Value
Commission
Commission (broker, exchange etc.).
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Commission", Description = "CommissionDesc", GroupName = "General")]
public decimal? Commission { get; set; }
Property Value
CommissionCurrency
Commission currency. Can be null.
public string CommissionCurrency { get; set; }
Property Value
Condition
Order condition (e.g., stop- and algo- orders parameters).
[Display(ResourceType = typeof(LocalizedStrings), Name = "Condition", Description = "OrderConditionDesc", GroupName = "ConditionalOrder")]
public OrderCondition Condition { get; set; }
Property Value
Currency
Trading security currency.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Currency", Description = "CurrencyDesc", GroupName = "General")]
public CurrencyTypes? Currency { get; set; }
Property Value
- CurrencyTypes?
DerivedOrder
Exchange order that was created by the stop-order when the condition is activated (null if a stop condition has not been activated).
[Display(ResourceType = typeof(LocalizedStrings), Name = "LinkedOrder", Description = "LinkedOrderDesc", GroupName = "ConditionalOrder")]
[Obsolete("No longer used.")]
public Order DerivedOrder { get; set; }
Property Value
Direction
Order side (buy or sell).
[Browsable(false)]
[Obsolete("Use Side property.")]
public Sides Direction { get; set; }
Property Value
ExpiryDate
Order expiry time. The default is null, which mean (GTC).
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Expiration", Description = "OrderExpirationTime", GroupName = "General")]
public DateTimeOffset? ExpiryDate { get; set; }
Property Value
Remarks
If the value is null, then the order is registered until cancel. Otherwise, the period is specified.
Id
Order ID.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Identifier", Description = "IdStringDot", GroupName = "General")]
public long? Id { get; set; }
Property Value
- long?
IsManual
Is order manual.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Manual", Description = "IsOrderManual", GroupName = "General")]
public bool? IsManual { get; set; }
Property Value
- bool?
IsMarketMaker
Is the order of market-maker.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "MarketMaker", Description = "MarketMakerOrderDot", GroupName = "General")]
public bool? IsMarketMaker { get; set; }
Property Value
- bool?
IsSystem
Is a system trade.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "System", Description = "IsSystemTrade", GroupName = "General")]
public bool? IsSystem { get; set; }
Property Value
- bool?
LastChangeTime
Time of last order change (Cancellation, Fill).
[Obsolete("Use ServerTime property.")]
[Browsable(false)]
public DateTimeOffset LastChangeTime { get; set; }
Property Value
LatencyCancellation
Time taken to cancel an order.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Cancellation", Description = "OrderCancelLatency", GroupName = "Latency", Order = 1001)]
public TimeSpan? LatencyCancellation { get; set; }
Property Value
LatencyEdition
Time taken to edit an order.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Edition", Description = "EditionLatency", GroupName = "Latency", Order = 1002)]
public TimeSpan? LatencyEdition { get; set; }
Property Value
LatencyRegistration
Time taken to register an order.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Registration", Description = "OrderRegLatency", GroupName = "Latency", Order = 1000)]
public TimeSpan? LatencyRegistration { get; set; }
Property Value
Leverage
Margin leverage.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Leverage", Description = "MarginLeverage", GroupName = "General")]
public int? Leverage { get; set; }
Property Value
- int?
LocalTime
Last order change local time (Cancellation, Fill).
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LocalTime", Description = "LocalTimeDesc", GroupName = "General")]
public DateTimeOffset LocalTime { get; set; }
Property Value
MarginMode
Margin mode.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Margin", Description = "MarginMode", GroupName = "General")]
public MarginModes? MarginMode { get; set; }
Property Value
MatchedTime
Cancelled time.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Match", Description = "MatchedTime", GroupName = "General")]
public DateTimeOffset? MatchedTime { get; set; }
Property Value
MinVolume
Minimum quantity of an order to be executed.
[DataMember]
public decimal? MinVolume { get; set; }
Property Value
Portfolio
Portfolio, in which the order is being traded.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Portfolio", Description = "OrderPortfolio", GroupName = "General")]
public Portfolio Portfolio { get; set; }
Property Value
PositionEffect
Position effect.
[DataMember]
public OrderPositionEffects? PositionEffect { get; set; }
Property Value
PostOnly
Post-only order.
[DataMember]
public bool? PostOnly { get; set; }
Property Value
- bool?
Price
Order price.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Price", Description = "OrderPrice", GroupName = "General")]
public decimal Price { get; set; }
Property Value
Security
Security, for which an order is being placed.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Security", Description = "OrderSecurity", GroupName = "General")]
public Security Security { get; set; }
Property Value
SeqNum
Sequence number.
[DataMember]
public long SeqNum { get; set; }
Property Value
Remarks
Zero means no information.
ServerTime
Server time.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Changed", Description = "OrderLastChangeTime", GroupName = "General")]
public DateTimeOffset ServerTime { get; set; }
Property Value
Side
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Direction", Description = "OrderSideDesc", GroupName = "General")]
public Sides Side { get; set; }
Property Value
Slippage
Slippage in trade price.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Slippage", Description = "SlippageTrade", GroupName = "General")]
public decimal? Slippage { get; set; }
Property Value
State
Order state.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "State", Description = "OrderStateDesc", GroupName = "General")]
public OrderStates State { get; set; }
Property Value
Status
System order status.
[DataMember]
[Browsable(false)]
public long? Status { get; set; }
Property Value
- long?
StrategyId
Strategy id.
[DataMember]
public string StrategyId { get; set; }
Property Value
StringId
Order ID (as string, if electronic board does not use numeric order ID representation).
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "IdString", Description = "OrderIdStringDesc", GroupName = "General")]
public string StringId { get; set; }
Property Value
Time
Order placing time on exchange.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "RegTime", Description = "RegTimeDesc", GroupName = "General")]
public DateTimeOffset Time { get; set; }
Property Value
TimeInForce
Limit order time in force.
[Display(ResourceType = typeof(LocalizedStrings), Name = "TimeInForce", Description = "LimitOrderTif", GroupName = "General")]
public TimeInForce? TimeInForce { get; set; }
Property Value
TransactionId
Transaction ID. Automatically set when the RegisterOrder(Order) method called.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Transaction", Description = "TransactionIdDot", GroupName = "General")]
public long TransactionId { get; set; }
Property Value
Type
Order type.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "OrderType", Description = "OrderTypeDesc", GroupName = "General")]
public OrderTypes? Type { get; set; }
Property Value
UserOrderId
User's order ID.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "UserId", Description = "UserOrderId", GroupName = "General")]
public string UserOrderId { get; set; }
Property Value
VisibleVolume
Visible quantity of contracts in order.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "VisibleVolume", Description = "VisibleVolumeDesc", GroupName = "General")]
public decimal? VisibleVolume { get; set; }
Property Value
Volume
Number of contracts in the order.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Volume", Description = "OrderVolume", GroupName = "General")]
public decimal Volume { get; set; }
Property Value
Yield
Yield.
[DataMember]
public decimal? Yield { get; set; }
Property Value
Methods
ToString()
public override string ToString()