Table of Contents

Class Security

Namespace
StockSharp.BusinessEntities
Assembly
StockSharp.BusinessEntities.dll

Security (shares, futures, options etc.).

[DataContract]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Security", Description = "SecurityDesc")]
public class Security : Cloneable<Security>, INotifyPropertyChanged
Inheritance
Security
Implements
Derived
Extension Methods

Constructors

Security()

Initializes a new instance of the Security.

public Security()

Properties

AsksCount

Number of sell orders.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Asks", Description = "AsksCountDesc", GroupName = "Statistics", Order = 224)]
[Browsable(false)]
public int? AsksCount { get; set; }

Property Value

int?

AsksVolume

Total volume in all sell orders.

[Display(ResourceType = typeof(LocalizedStrings), Name = "AsksVolume", Description = "AsksVolumeDesc", GroupName = "Statistics", Order = 223)]
[Browsable(false)]
public decimal? AsksVolume { get; set; }

Property Value

decimal?

AveragePrice

Average price per session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "AveragePrice", Description = "AveragePriceDesc", GroupName = "Statistics", Order = 231)]
[Browsable(false)]
public decimal? AveragePrice { get; set; }

Property Value

decimal?

BasketCode

Basket security type. Can be null in case of regular security.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Code", Description = "BasketCode", GroupName = "Basket", Order = 200)]
public virtual string BasketCode { get; set; }

Property Value

string

BasketExpression

Basket security expression. Can be null in case of regular security.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Expression", Description = "ExpressionDesc", GroupName = "Basket", Order = 201)]
public virtual string BasketExpression { get; set; }

Property Value

string

BestAsk

Best ask in market depth.

[Display(ResourceType = typeof(LocalizedStrings), Name = "BestAsk", Description = "BestAskDesc", GroupName = "Statistics", Order = 207)]
[Browsable(false)]
public QuoteChange? BestAsk { get; set; }

Property Value

QuoteChange?

BestBid

Best bid in market depth.

[Display(ResourceType = typeof(LocalizedStrings), Name = "BestBid", Description = "BestBidDesc", GroupName = "Statistics", Order = 206)]
[Browsable(false)]
public QuoteChange? BestBid { get; set; }

Property Value

QuoteChange?

BestPair

Best pair quotes.

[Browsable(false)]
[Display(ResourceType = typeof(LocalizedStrings), Name = "BestPair", Description = "BestPairDot", GroupName = "Statistics", Order = 208)]
public MarketDepthPair BestPair { get; }

Property Value

MarketDepthPair

BidsCount

Number of buy orders.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Bids", Description = "BidsCountDesc", GroupName = "Statistics", Order = 222)]
[Browsable(false)]
public int? BidsCount { get; set; }

Property Value

int?

BidsVolume

Total volume in all buy orders.

[Display(ResourceType = typeof(LocalizedStrings), Name = "BidsVolume", Description = "BidsVolumeDesc", GroupName = "Statistics", Order = 221)]
[Browsable(false)]
public decimal? BidsVolume { get; set; }

Property Value

decimal?

BinaryOptionType

Type of binary option.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Binary", Description = "TypeBinaryOption", GroupName = "Derivatives", Order = 103)]
public string BinaryOptionType { get; set; }

Property Value

string

Board

Exchange board where the security is traded.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Board", Description = "ExchangeBoardDesc", GroupName = "General", Order = 2)]
[Required]
public virtual ExchangeBoard Board { get; set; }

Property Value

ExchangeBoard

BuyBackDate

BuyBack date.

[Browsable(false)]
public DateTimeOffset? BuyBackDate { get; set; }

Property Value

DateTimeOffset?

BuyBackPrice

BuyBack price.

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

Property Value

decimal?

CfiCode

Type in ISO 10962 standard.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "CfiCode", Description = "CfiCodeDesc", GroupName = "General", Order = 16)]
public string CfiCode { get; set; }

Property Value

string

Class

Security class.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Class", Description = "SecurityClass", GroupName = "General", Order = 8)]
public string Class { get; set; }

Property Value

string

ClosePrice

Last trade price for the previous session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "LastTradePrice", Description = "LastTradePriceDesc", GroupName = "Statistics", Order = 203)]
[Browsable(false)]
public decimal? ClosePrice { get; set; }

Property Value

decimal?

Code

Security code.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Code", Description = "SecCodeDot", GroupName = "General", Order = 1)]
[Required(AllowEmptyStrings = false)]
public string Code { get; set; }

Property Value

string

CommissionMaker

Commission (maker).

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

Property Value

decimal?

CommissionTaker

Commission (taker).

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

Property Value

decimal?

Currency

Trading security currency.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Currency", Description = "CurrencyDesc", GroupName = "General", Order = 6)]
public CurrencyTypes? Currency { get; set; }

Property Value

CurrencyTypes?

Decimals

Number of digits in price after coma.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Decimals", Description = "DecimalsDesc", GroupName = "General", Order = 13)]
public int? Decimals { get; set; }

Property Value

int?

Delta

Option delta.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Delta", Description = "OptionDelta", GroupName = "Derivatives", Order = 107)]
[Browsable(false)]
public decimal? Delta { get; set; }

Property Value

decimal?

ExpiryDate

Security expiration date (for derivatives - expiration, for bonds — redemption).

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ExpiryDate", Description = "ExpiryDateDesc", GroupName = "General", Order = 14)]
public DateTimeOffset? ExpiryDate { get; set; }

Property Value

DateTimeOffset?

ExternalId

Security ID in other systems.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ExternalId", Description = "ExternalIdDesc", GroupName = "General", Order = 7)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public SecurityExternalId ExternalId { get; set; }

Property Value

SecurityExternalId

FaceValue

Face value.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "FaceValue", Description = "FaceValueDesc", GroupName = "General", Order = 17)]
public decimal? FaceValue { get; set; }

Property Value

decimal?

Gamma

Option gamma.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Gamma", Description = "OptionGamma", GroupName = "Derivatives", Order = 108)]
[Browsable(false)]
public decimal? Gamma { get; set; }

Property Value

decimal?

HighBidPrice

Maximum bid during the session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "BidMax", Description = "BidMaxDesc", GroupName = "Statistics", Order = 226)]
[Browsable(false)]
public decimal? HighBidPrice { get; set; }

Property Value

decimal?

HighPrice

Highest price for the session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "HighestPrice", Description = "HighestPriceForSession", GroupName = "Statistics", Order = 205)]
[Browsable(false)]
public decimal? HighPrice { get; set; }

Property Value

decimal?

HistoricalVolatility

Volatility (historical).

[Display(ResourceType = typeof(LocalizedStrings), Name = "HV", Description = "HistoricalVolatilityDot", GroupName = "Derivatives", Order = 105)]
[Browsable(false)]
public decimal? HistoricalVolatility { get; set; }

Property Value

decimal?

Id

Security ID.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Identifier", Description = "SecurityIdDot", GroupName = "General", Order = 0)]
public string Id { get; set; }

Property Value

string

ImpliedVolatility

Volatility (implied).

[Display(ResourceType = typeof(LocalizedStrings), Name = "IV", Description = "ImpliedVolatilityDot", GroupName = "Derivatives", Order = 104)]
[Browsable(false)]
public decimal? ImpliedVolatility { get; set; }

Property Value

decimal?

IssueDate

Date of issue.

[Display(ResourceType = typeof(LocalizedStrings), Name = "IssueDate", Description = "IssueDateDot", GroupName = "General", Order = 22)]
[DataMember]
public DateTimeOffset? IssueDate { get; set; }

Property Value

DateTimeOffset?

IssueSize

Number of issued contracts.

[Display(ResourceType = typeof(LocalizedStrings), Name = "IssueSize", Description = "IssueSizeDot", GroupName = "General", Order = 21)]
[DataMember]
public decimal? IssueSize { get; set; }

Property Value

decimal?

LastChangeTime

Time of the last instrument change.

[Browsable(false)]
public DateTimeOffset LastChangeTime { get; set; }

Property Value

DateTimeOffset

LastTick

Information about the last trade. If during the session on the instrument there were no trades, the value equals to null.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LastTrade", Description = "LastTradeDesc", GroupName = "Statistics", Order = 201)]
[Browsable(false)]
public ITickTradeMessage LastTick { get; set; }

Property Value

ITickTradeMessage

LastTrade

Information about the last trade. If during the session on the instrument there were no trades, the value equals to null.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LastTrade", Description = "LastTradeDesc", GroupName = "Statistics", Order = 201)]
[Browsable(false)]
[Obsolete("Use LastTick property.")]
public Trade LastTrade { get; }

Property Value

Trade

LocalTime

Local time of the last instrument change.

[Browsable(false)]
public DateTimeOffset LocalTime { get; set; }

Property Value

DateTimeOffset

LowAskPrice

Minimum ask during the session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "AskMin", Description = "AskMinDesc", GroupName = "Statistics", Order = 227)]
[Browsable(false)]
public decimal? LowAskPrice { get; set; }

Property Value

decimal?

LowPrice

Lowest price for the session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "LowPrice", Description = "LowPriceForSession", GroupName = "Statistics", Order = 204)]
[Browsable(false)]
public decimal? LowPrice { get; set; }

Property Value

decimal?

MarginBuy

Initial margin to buy.

[Display(ResourceType = typeof(LocalizedStrings), Name = "MarginBuy", Description = "MarginBuyDesc", GroupName = "Statistics", Order = 212)]
[Browsable(false)]
public decimal? MarginBuy { get; set; }

Property Value

decimal?

MarginSell

Initial margin to sell.

[Display(ResourceType = typeof(LocalizedStrings), Name = "MarginSell", Description = "MarginSellDesc", GroupName = "Statistics", Order = 213)]
[Browsable(false)]
public decimal? MarginSell { get; set; }

Property Value

decimal?

MaxPrice

Upper price limit.

[Display(ResourceType = typeof(LocalizedStrings), Name = "PriceMax", Description = "PriceMaxLimit", GroupName = "Statistics", Order = 211)]
[Browsable(false)]
public decimal? MaxPrice { get; set; }

Property Value

decimal?

MaxVolume

Maximum volume allowed in order.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "MaxVolume", Description = "MaxVolumeDesc", GroupName = "General", Order = 11)]
public decimal? MaxVolume { get; set; }

Property Value

decimal?

MinPrice

Lower price limit.

[Display(ResourceType = typeof(LocalizedStrings), Name = "PriceMin", Description = "PriceMinLimit", GroupName = "Statistics", Order = 210)]
[Browsable(false)]
public decimal? MinPrice { get; set; }

Property Value

decimal?

MinVolume

Minimum volume allowed in order.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "MinVolume", Description = "MinVolumeDesc", GroupName = "General", Order = 10)]
public decimal? MinVolume { get; set; }

Property Value

decimal?

Multiplier

Lot multiplier.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Lot", Description = "LotVolume", GroupName = "General", Order = 12)]
public decimal? Multiplier { get; set; }

Property Value

decimal?

Name

Security name.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Name", Description = "SecurityName", GroupName = "General", Order = 4)]
public string Name { get; set; }

Property Value

string

OpenInterest

Number of open positions (open interest).

[Display(ResourceType = typeof(LocalizedStrings), Name = "OpenInterest", Description = "OpenInterestDesc", GroupName = "Statistics", Order = 220)]
[Browsable(false)]
public decimal? OpenInterest { get; set; }

Property Value

decimal?

OpenPrice

First trade price for the session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "FirstTradePrice", Description = "FirstTradePriceForSession", GroupName = "Statistics", Order = 202)]
[Browsable(false)]
public decimal? OpenPrice { get; set; }

Property Value

decimal?

OptionStyle

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "OptionStyle", Description = "OptionStyleDesc", GroupName = "General", Order = 19)]
public OptionStyles? OptionStyle { get; set; }

Property Value

OptionStyles?

OptionType

Option type.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "OptionType", Description = "OptionContractType", GroupName = "Derivatives", Order = 101)]
public OptionTypes? OptionType { get; set; }

Property Value

OptionTypes?

PriceStep

Minimum price step.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "PriceStep", Description = "MinPriceStep", GroupName = "General", Order = 9)]
public decimal? PriceStep { get; set; }

Property Value

decimal?

PrimaryId

Identifier on primary exchange.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "PrimaryId", Description = "PrimaryIdDesc", GroupName = "General", Order = 20)]
public string PrimaryId { get; set; }

Property Value

string

Rho

Option rho.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Rho", Description = "OptionRho", GroupName = "Derivatives", Order = 111)]
[Browsable(false)]
public decimal? Rho { get; set; }

Property Value

decimal?

SettlementDate

Settlement date for security (for derivatives and bonds).

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "SettlementDate", Description = "SettlementDateForSecurity", GroupName = "General", Order = 15)]
public DateTimeOffset? SettlementDate { get; set; }

Property Value

DateTimeOffset?

SettlementPrice

Settlement price.

[Display(ResourceType = typeof(LocalizedStrings), Name = "SettlementPrice", Description = "SettlementPriceDesc", GroupName = "Statistics", Order = 230)]
[Browsable(false)]
public decimal? SettlementPrice { get; set; }

Property Value

decimal?

SettlementType

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Settlement", Description = "SettlementTypeDesc", GroupName = "General", Order = 18)]
public SettlementTypes? SettlementType { get; set; }

Property Value

SettlementTypes?

ShortName

Short security name.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ShortName", Description = "ShortNameDesc", GroupName = "General", Order = 5)]
public string ShortName { get; set; }

Property Value

string

Shortable

Can have short positions.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Shortable", Description = "ShortableDesc", GroupName = "General", Order = 22)]
[DataMember]
public bool? Shortable { get; set; }

Property Value

bool?

State

Current state of security.

[Display(ResourceType = typeof(LocalizedStrings), Name = "State", Description = "SecurityState", GroupName = "Statistics", Order = 209)]
[Browsable(false)]
public SecurityStates? State { get; set; }

Property Value

SecurityStates?

StepPrice

Step price.

[Display(ResourceType = typeof(LocalizedStrings), Name = "StepPrice", Description = "StepPriceDesc", GroupName = "Statistics", Order = 200)]
[Browsable(false)]
public decimal? StepPrice { get; set; }

Property Value

decimal?

Strike

Option strike price.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Strike", Description = "OptionStrikePrice", GroupName = "Derivatives", Order = 102)]
public decimal? Strike { get; set; }

Property Value

decimal?

TheorPrice

Theoretical price.

[Display(ResourceType = typeof(LocalizedStrings), Name = "TheorPrice", Description = "TheoreticalPrice", GroupName = "Derivatives", Order = 106)]
[Browsable(false)]
public decimal? TheorPrice { get; set; }

Property Value

decimal?

Theta

Option theta.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Theta", Description = "OptionTheta", GroupName = "Derivatives", Order = 110)]
[Browsable(false)]
public decimal? Theta { get; set; }

Property Value

decimal?

TradesCount

Number of trades.

[Display(ResourceType = typeof(LocalizedStrings), Name = "TradesOf", Description = "LimitOrderTif", GroupName = "Statistics", Order = 225)]
[Browsable(false)]
public int? TradesCount { get; set; }

Property Value

int?

Turnover

Turnover.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Turnover", Description = "TurnoverDot", GroupName = "Statistics", Order = 232)]
[Browsable(false)]
public decimal? Turnover { get; set; }

Property Value

decimal?

Type

Security type.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Type", Description = "SecurityTypeDesc", GroupName = "General", Order = 3)]
public virtual SecurityTypes? Type { get; set; }

Property Value

SecurityTypes?

UnderlyingSecurityId

Underlying asset on which the current security is built.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "UnderlyingAsset", Description = "UnderlyingAssetDesc", GroupName = "Derivatives", Order = 100)]
public string UnderlyingSecurityId { get; set; }

Property Value

string

UnderlyingSecurityMinVolume

Minimum volume allowed in order for underlying security.

[Display(ResourceType = typeof(LocalizedStrings), Name = "UnderlyingMinVolume", Description = "UnderlyingMinVolumeDesc", GroupName = "Derivatives", Order = 104)]
[DataMember]
public decimal? UnderlyingSecurityMinVolume { get; set; }

Property Value

decimal?

UnderlyingSecurityType

Underlying security type.

[Display(ResourceType = typeof(LocalizedStrings), Name = "AssetType", Description = "UnderlyingSecurityTypeDot", GroupName = "Derivatives", Order = 103)]
[DataMember]
public SecurityTypes? UnderlyingSecurityType { get; set; }

Property Value

SecurityTypes?

VWAP

Average price.

[Display(ResourceType = typeof(LocalizedStrings), Name = "AveragePrice", Description = "AveragePriceDot", GroupName = "Statistics", Order = 229)]
[Browsable(false)]
public decimal? VWAP { get; set; }

Property Value

decimal?

Vega

Option vega.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Vega", Description = "OptionVega", GroupName = "Derivatives", Order = 109)]
[Browsable(false)]
public decimal? Vega { get; set; }

Property Value

decimal?

Volume

Volume per session.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Volume", Description = "VolumeDesc", GroupName = "Statistics", Order = 232)]
[Browsable(false)]
public decimal? Volume { get; set; }

Property Value

decimal?

VolumeStep

Minimum volume step.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "VolumeStep", Description = "MinVolStep", GroupName = "General", Order = 10)]
public decimal? VolumeStep { get; set; }

Property Value

decimal?

Yield

Yield.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Yield", Description = "YieldDot", GroupName = "Statistics", Order = 228)]
[Browsable(false)]
public decimal? Yield { get; set; }

Property Value

decimal?

Methods

Clone()

Create a copy of Security.

public override Security Clone()

Returns

Security

Copy.

CopyTo(Security)

To copy fields of the current instrument to destination.

public void CopyTo(Security destination)

Parameters

destination Security

The instrument in which you should to copy fields.

Notify(string)

To call the event PropertyChanged.

protected void Notify(string propName = null)

Parameters

propName string

Property name.

ToString()

public override string ToString()

Returns

string