Class Trade
- Namespace
- StockSharp.BusinessEntities
- Assembly
- StockSharp.BusinessEntities.dll
Tick trade.
[DataContract]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Trade", Description = "TickTrade")]
[Obsolete("Use ITickTradeMessage.")]
public class Trade : Cloneable<Trade>, ITickTradeMessage, ISecurityIdMessage, ISeqNumMessage, ICurrencyMessage, ISystemMessage, IServerTimeMessage, IGeneratedMessage, ILocalTimeMessage, IComplexIdMessage
- Inheritance
-
Trade
- Implements
- Extension Methods
Constructors
Trade()
Initializes a new instance of the Trade.
public Trade()
Properties
BuildFrom
Determines the message is generated from the specified DataType.
public DataType BuildFrom { get; set; }
Property Value
Currency
Trading security currency.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Currency", Description = "CurrencyDesc", GroupName = "General", Order = 7)]
public CurrencyTypes? Currency { get; set; }
Property Value
- CurrencyTypes?
Id
ID.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Identifier", Description = "TradeId", GroupName = "General", Order = 0)]
public long? Id { get; set; }
Property Value
- long?
IsSystem
Is a system.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "SystemTrade", Description = "IsSystemTrade", GroupName = "General", Order = 6)]
public bool? IsSystem { get; set; }
Property Value
- bool?
IsUpTick
Is tick ascending or descending in price.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "UpTrend", Description = "UpTrendDesc", GroupName = "Statistics", Order = 11)]
public bool? IsUpTick { get; set; }
Property Value
- bool?
LocalTime
Local timestamp when a message was received/created.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LocalTime", Description = "TradeLocalTime", GroupName = "General", Order = 9)]
public DateTimeOffset LocalTime { get; set; }
Property Value
OpenInterest
Number of open positions (open interest).
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "OpenInterest", Description = "OpenInterestDesc", GroupName = "Statistics", Order = 10)]
public decimal? OpenInterest { get; set; }
Property Value
OrderBuyId
Order id (buy).
[DataMember]
public long? OrderBuyId { get; set; }
Property Value
- long?
OrderDirection
[Browsable(false)]
[Obsolete("Use OriginSide property.")]
public Sides? OrderDirection { get; set; }
Property Value
OrderSellId
Order id (sell).
[DataMember]
public long? OrderSellId { get; set; }
Property Value
- long?
OriginSide
Order side (buy or sell), which led to the trade.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Initiator", Description = "DirectionDesc", GroupName = "General", Order = 5)]
public Sides? OriginSide { get; set; }
Property Value
Price
Trade price.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Price", Description = "TradePriceDesc", GroupName = "General", Order = 3)]
public decimal Price { get; set; }
Property Value
Security
The instrument, on which the trade was completed.
[Browsable(false)]
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 = "Time", Description = "TradeTime", GroupName = "General", Order = 3)]
public DateTimeOffset ServerTime { get; set; }
Property Value
Status
System status.
[Browsable(false)]
public long? Status { get; set; }
Property Value
- long?
StringId
ID (as string, if electronic board does not use numeric ID representation).
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "IdString", Description = "TradeIdString", GroupName = "General", Order = 1)]
public string StringId { get; set; }
Property Value
Time
[Browsable(false)]
[Obsolete("Use ServerTime property.")]
public DateTimeOffset Time { get; set; }
Property Value
Volume
Number of contracts in the trade.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Volume", Description = "TradeVolumeDesc", GroupName = "General", Order = 4)]
public decimal Volume { get; set; }
Property Value
Yield
Yield.
[DataMember]
public decimal? Yield { get; set; }
Property Value
Methods
Clone()
Create a copy of Trade.
public override Trade Clone()
Returns
- Trade
Copy.
GetHashCode()
Get the hash code of the object Trade.
public override int GetHashCode()
Returns
- int
A hash code.
ToString()
public override string ToString()