Show / Hide Table of Contents

Class Trade

Tick trade.

Inheritance
Object
Trade
Implements
IExtendableEntity
Namespace: StockSharp.BusinessEntities
Assembly: StockSharp.BusinessEntities.dll
Syntax
[DisplayNameLoc("Str506")]
[DescriptionLoc("TickTrade", false)]
public class Trade : Cloneable<Trade>, IExtendableEntity

Constructors

Trade()

Initializes a new instance of the Trade.

Declaration
public Trade()

Properties

BuildFrom

Determines the message is generated from the specified DataType.

Declaration
public DataType BuildFrom { get; set; }
Property Value
Type Description
DataType

Currency

Trading security currency.

Declaration
public Nullable<CurrencyTypes> Currency { get; set; }
Property Value
Type Description
Nullable<Ecng.Common.CurrencyTypes>

ExtensionInfo

Extended information.

Declaration
public IDictionary<string, object> ExtensionInfo { get; set; }
Property Value
Type Description
IDictionary<String, Object>
Remarks

Required when extra information is stored in the program.

Id

Trade ID.

Declaration
public long Id { get; set; }
Property Value
Type Description
Int64

IsSystem

Is a system trade.

Declaration
public Nullable<bool> IsSystem { get; set; }
Property Value
Type Description
Nullable<Boolean>

IsUpTick

Is tick ascending or descending in price.

Declaration
public Nullable<bool> IsUpTick { get; set; }
Property Value
Type Description
Nullable<Boolean>

LocalTime

Trade received local time.

Declaration
public DateTimeOffset LocalTime { get; set; }
Property Value
Type Description
DateTimeOffset

OpenInterest

Number of open positions (open interest).

Declaration
public Nullable<Decimal> OpenInterest { get; set; }
Property Value
Type Description
Nullable<Decimal>

OrderBuyId

Order id (buy).

Declaration
public Nullable<long> OrderBuyId { get; set; }
Property Value
Type Description
Nullable<Int64>

OrderDirection

Order side (buy or sell), which led to the trade.

Declaration
public Nullable<Sides> OrderDirection { get; set; }
Property Value
Type Description
Nullable<Sides>

OrderSellId

Order id (sell).

Declaration
public Nullable<long> OrderSellId { get; set; }
Property Value
Type Description
Nullable<Int64>

Price

Trade price.

Declaration
public Decimal Price { get; set; }
Property Value
Type Description
Decimal

Security

The instrument, on which the trade was completed.

Declaration
public Security Security { get; set; }
Property Value
Type Description
Security

SeqNum

Sequence number.

Declaration
public long SeqNum { get; set; }
Property Value
Type Description
Int64
Remarks

Zero means no information.

Status

System trade status.

Declaration
public Nullable<int> Status { get; set; }
Property Value
Type Description
Nullable<Int32>

StringId

Trade ID (as string, if electronic board does not use numeric order ID representation).

Declaration
public string StringId { get; set; }
Property Value
Type Description
String

Time

Trade time.

Declaration
public DateTimeOffset Time { get; set; }
Property Value
Type Description
DateTimeOffset

Volume

Number of contracts in the trade.

Declaration
public Decimal Volume { get; set; }
Property Value
Type Description
Decimal

Yield

Yield.

Declaration
public Nullable<Decimal> Yield { get; set; }
Property Value
Type Description
Nullable<Decimal>

Methods

Clone()

Create a copy of Trade.

Declaration
public override Trade Clone()
Returns
Type Description
Trade

Copy.

GetHashCode()

Get the hash code of the object Trade.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

A hash code.

ToString()

Declaration
public override string ToString()
Returns
Type Description
String

Implements

IExtendableEntity

Extension Methods

MessageConverterHelper.ToMessage(Trade)
Paths.Serialize<T>(T, String)
Paths.Serialize<T>(T)
Extensions.TryGet<TMessage, TChange>(TMessage, TChange)
Extensions.TryGetDecimal<TMessage, TChange>(TMessage, TChange)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Object)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Decimal)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Int32)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Int64)
Extensions.Add<TMessage, TChange>(TMessage, TChange, SecurityStates)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<SecurityStates>)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, String)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Sides)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Sides>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, CurrencyTypes)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<CurrencyTypes>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, PortfolioStates)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<PortfolioStates>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, DateTimeOffset)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<DateTimeOffset>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Boolean>)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Decimal, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Decimal>, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Int32, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Int32>, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Int64, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Int64>, Boolean)
EditorExtensions.ToItemsSource(Object, Type, Nullable<Boolean>, Nullable<ListSortDirection>, Func<IItemsSourceItem, Boolean>, Func<Object, String>, Func<Object, String>)
XamlHelper.WpfCast<T>(Object)
XamlHelper.CopyToClipboard<T>(T)
XamlHelper.EnsureUIThread(Object)
☀
☾
In This Article
Back to top
Copyright © StockSharp.
☀
☾