Table of Contents

Interface IMessageAdapter

Namespace
StockSharp.Messages
Assembly
StockSharp.Messages.dll

Base message adapter interface which convert messages Message to native commands and back.

public interface IMessageAdapter : IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable
Inherited Members
Extension Methods

Properties

AssociatedBoards

The adapter can process subscription only with instruments associated with the specified board.

string[] AssociatedBoards { get; }

Property Value

string[]

CandlesBuildFrom

Possible options for candles building.

IEnumerable<Level1Fields> CandlesBuildFrom { get; }

Property Value

IEnumerable<Level1Fields>

Categories

Message adapter categories.

MessageAdapterCategories Categories { get; }

Property Value

MessageAdapterCategories

CheckTimeFrameByRequest

Check possible time-frame by request.

bool CheckTimeFrameByRequest { get; }

Property Value

bool

EnqueueSubscriptions

Enqueue subscriptions.

bool EnqueueSubscriptions { get; set; }

Property Value

bool

Remarks

Do not send new request before received confirmation for previous.

ExtraSetup

The adapter requires extra setup.

bool ExtraSetup { get; }

Property Value

bool

FeatureName

Feature name.

string FeatureName { get; }

Property Value

string

GenerateOrderBookFromLevel1

bool GenerateOrderBookFromLevel1 { get; set; }

Property Value

bool

HeartbeatBeforConnect

Start sending TimeMessage before connection established.

bool HeartbeatBeforConnect { get; }

Property Value

bool

HeartbeatInterval

Server check interval for track the connection alive. The value is Zero turned off tracking.

TimeSpan HeartbeatInterval { get; set; }

Property Value

TimeSpan

Icon

Icon.

Uri Icon { get; }

Property Value

Uri

IsAutoReplyOnTransactonalUnsubscription

Send auto response for OrderStatusMessage and PortfolioLookupMessage unsubscribes.

bool IsAutoReplyOnTransactonalUnsubscription { get; }

Property Value

bool

IsFullCandlesOnly

Translates CandleMessage as only fully filled.

bool IsFullCandlesOnly { get; }

Property Value

bool

IsNativeIdentifiers

Identify security in messages by native identifier Native.

bool IsNativeIdentifiers { get; }

Property Value

bool

IsNativeIdentifiersPersistable

Native identifier can be stored.

bool IsNativeIdentifiersPersistable { get; }

Property Value

bool

IsPositionsEmulationRequired

Adapter required emulation PositionChangeMessage.

bool? IsPositionsEmulationRequired { get; }

Property Value

bool?

Remarks

null means no emulatior, true by order balance, false by trades.

IsReplaceCommandEditCurrent

Is the OrderReplaceMessage command edit a current order.

bool IsReplaceCommandEditCurrent { get; }

Property Value

bool

IsSecurityNewsOnly

Adapter provides news related with specified security.

bool IsSecurityNewsOnly { get; }

Property Value

bool

IsSupportExecutionsPnL

Adapter fills PnL.

bool IsSupportExecutionsPnL { get; }

Property Value

bool

IsSupportOrderBookIncrements

Adapter translates incremental order books.

bool IsSupportOrderBookIncrements { get; }

Property Value

bool

IsSupportPartialDownloading

Support partial downloading.

bool IsSupportPartialDownloading { get; }

Property Value

bool

IsSupportSubscriptions

Support any subscriptions (ticks, order books etc.).

bool IsSupportSubscriptions { get; }

Property Value

bool

IsSupportTransactionLog

Adapter translates orders changes on reply of OrderStatusMessage.

bool IsSupportTransactionLog { get; }

Property Value

bool

IterationInterval

Interval between iterations.

TimeSpan IterationInterval { get; }

Property Value

TimeSpan

LookupTimeout

Lookup timeout.

TimeSpan? LookupTimeout { get; }

Property Value

TimeSpan?

OrderConditionType

Type of OrderCondition.

Type OrderConditionType { get; }

Property Value

Type

Remarks

If the connection does not support the order type Conditional, it will be returned null.

PossibleSupportedMessages

Possible supported by adapter message types.

IEnumerable<MessageTypeInfo> PossibleSupportedMessages { get; }

Property Value

IEnumerable<MessageTypeInfo>

ReConnectionSettings

Connection tracking settings IMessageAdapter with a server.

ReConnectionSettings ReConnectionSettings { get; }

Property Value

ReConnectionSettings

SecurityExtendedFields

Names of extended security fields in SecurityMessage.

IEnumerable<Tuple<string, Type>> SecurityExtendedFields { get; }

Property Value

IEnumerable<Tuple<string, Type>>

StorageName

The storage name, associated with the adapter.

string StorageName { get; }

Property Value

string

SupportedInMessages

Supported by adapter message types.

IEnumerable<MessageTypes> SupportedInMessages { get; set; }

Property Value

IEnumerable<MessageTypes>

SupportedMarketDataTypes

Supported by adapter market data types.

IEnumerable<DataType> SupportedMarketDataTypes { get; }

Property Value

IEnumerable<DataType>

SupportedOrderBookDepths

Available options for MaxDepth.

IEnumerable<int> SupportedOrderBookDepths { get; }

Property Value

IEnumerable<int>

SupportedResultMessages

Supported by adapter result message types.

IEnumerable<MessageTypes> SupportedResultMessages { get; }

Property Value

IEnumerable<MessageTypes>

TransactionIdGenerator

Transaction id generator.

IdGenerator TransactionIdGenerator { get; }

Property Value

IdGenerator

UseChannels

Use channels for in and out messages.

bool UseChannels { get; }

Property Value

bool

Methods

CreateOrderLogMarketDepthBuilder(SecurityId)

Create market depth builder.

IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)

Parameters

securityId SecurityId

Security ID.

Returns

IOrderLogMarketDepthBuilder

Order log to market depth builder.

GetCandleArgs(Type, SecurityId, DateTimeOffset?, DateTimeOffset?)

Get possible args for the specified candle type and instrument.

IEnumerable<object> GetCandleArgs(Type candleType, SecurityId securityId = default, DateTimeOffset? from = null, DateTimeOffset? to = null)

Parameters

candleType Type

The type of the message CandleMessage.

securityId SecurityId

Security ID.

from DateTimeOffset?

The initial date from which you need to get data.

to DateTimeOffset?

The final date by which you need to get data.

Returns

IEnumerable<object>

Possible args.

GetHistoryStepSize(SecurityId, DataType, out TimeSpan)

Get maximum size step allowed for historical download.

TimeSpan GetHistoryStepSize(SecurityId securityId, DataType dataType, out TimeSpan iterationInterval)

Parameters

securityId SecurityId

SecurityId

dataType DataType

Data type info.

iterationInterval TimeSpan

Interval between iterations.

Returns

TimeSpan

Step.

GetMaxCount(DataType)

Get maximum possible items count per single subscription request.

int? GetMaxCount(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

int?

Max items count.

GetSupportedDataTypes(SecurityId)

Get supported data types for the specified SecurityId.

IEnumerable<DataType> GetSupportedDataTypes(SecurityId securityId)

Parameters

securityId SecurityId

SecurityId

Returns

IEnumerable<DataType>

Supported data types.

IsAllDownloadingSupported(DataType)

Is for the specified dataType all securities downloading enabled.

bool IsAllDownloadingSupported(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

IsSecurityRequired(DataType)

Support filtering subscriptions (subscribe/unsubscribe for specified security).

bool IsSecurityRequired(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

IsSupportCandlesPriceLevels(MarketDataMessage)

Support candles PriceLevels.

bool IsSupportCandlesPriceLevels(MarketDataMessage subscription)

Parameters

subscription MarketDataMessage

MarketDataMessage

Returns

bool

Check result.

IsSupportCandlesUpdates(MarketDataMessage)

Support candles subscription and live updates.

bool IsSupportCandlesUpdates(MarketDataMessage subscription)

Parameters

subscription MarketDataMessage

MarketDataMessage

Returns

bool

Check result.