MessageAdapter

StockSharp.Messages

The base adapter converts messages Message to the command of the trading system and back.

Hereda de: BaseLogReceiver

Implementa: IMessageAdapter, IMessageTransport, IPersistable, ILogReceiver, ILogSource, IDisposable, ICloneable<IMessageAdapter>, ICloneable, INotifyPropertyChanged

Constructores

MessageAdapter(IdGenerator)

Initialize MessageAdapter.

transactionIdGenerator
Transaction id generator.

Propiedades

AssociatedBoards : string[]

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

CandlesBuildFrom : IEnumerable<Level1Fields>

Possible options for candles building.

Categories : MessageAdapterCategories

Message adapter categories.

CheckTimeFrameByRequest : bool

Check possible time-frame by request.

DisconnectTimeout : TimeSpan

Gets the timeout to wait for a graceful disconnect.

EnqueueSubscriptions : bool

Enqueue subscriptions.

ExtraSetup : bool

The adapter requires extra setup.

FaultDelay : TimeSpan

Gets or sets the delay applied between faulted iterations.

FeatureName : string

Feature name.

FileSystem : IFileSystem

IFileSystem

HeartbeatBeforeConnect : bool

Start sending TimeMessage before connection established.

HeartbeatInterval : TimeSpan

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

Icon : Uri

Icon.

IsAutoReplyOnTransactonalUnsubscription : bool

Send auto response for OrderStatusMessage and PortfolioLookupMessage unsubscribes.

IsFullCandlesOnly : bool

Translates CandleMessage as only fully filled.

IsNativeIdentifiers : bool

Identify security in messages by native identifier Native.

IsNativeIdentifiersPersistable : bool

Native identifier can be stored.

IsPositionsEmulationRequired : bool?

Adapter required emulation PositionChangeMessage.

IsReplaceCommandEditCurrent : bool

Is the OrderReplaceMessage command edit a current order.

IsSecurityNewsOnly : bool

Adapter provides news related with specified security.

IsSupportExecutionsPnL : bool

Adapter fills PnL.

IsSupportOrderBookIncrements : bool

Adapter translates incremental order books.

IsSupportSubscriptions : bool

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

IsSupportTransactionLog : bool

Adapter translates orders changes on reply of OrderStatusMessage.

IterationInterval : TimeSpan

Interval between iterations.

LookupTimeout : TimeSpan?

Lookup timeout.

MaxParallelMessages : int

Gets or sets the maximum number of parallel (non-control) messages that can be processed. Must be greater than or equal to1.

Name : string

Name.

NotSupportedResultMessages : IEnumerable<MessageTypes>

Not supported by adapter result message types.

OrderConditionType : Type

Type of OrderCondition.

Platform : Platforms

Bit process, which can run the adapter.

PossibleSupportedMessages : IEnumerable<MessageTypeInfo>

Possible supported message types.

ReConnectionSettings : ReConnectionSettings

Connection tracking settings IMessageAdapter with a server.

SecurityExtendedFields : IEnumerable<ValueTuple<string, Type>>

Names of extended security fields in SecurityMessage.

StorageName : string

Storage name.

SupportedInMessages : IEnumerable<MessageTypes>

Supported by adapter message types.

SupportedOrderBookDepths : IEnumerable<int>

Available options for MaxDepth.

TransactionIdGenerator : IdGenerator

Transaction id generator used for internal child subscription routing. Must be kept in sync with the parent adapter's generator.

UseInChannel : bool

Use channels for in messages.

UseOutChannel : bool

Use channels for out messages.

Métodos

Clone() : IMessageAdapter

Create a copy of MessageAdapter.

Devuelve: Copy.

CreateOrderLogMarketDepthBuilder(SecurityId) : IOrderLogMarketDepthBuilder

Create market depth builder.

securityId
Security ID.

Devuelve: Order log to market depth builder.

GetSupportedMarketDataTypesAsync(SecurityId, DateTime?, DateTime?) : IAsyncEnumerable<DataType>

Get supported by adapter message types.

securityId
SecurityId
from
Start date for request. If , then all available messages will be returned.
to
End date for request. If , then all available messages will be returned.

Devuelve: Supported by adapter market data types.

InitMessageLocalTime(Message)

Initialize local timestamp Message.

message
Message.
IsAllDownloadingSupported(DataType) : bool

Is for the specified all securities downloading enabled.

dataType
Data type info.

Devuelve: Check result.

IsSecurityRequired(DataType) : bool

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

dataType
Data type info.

Devuelve: Check result.

IsSupportCandlesPriceLevels(MarketDataMessage) : bool

Support candles PriceLevels.

subscription
MarketDataMessage

Devuelve: Check result.

IsSupportCandlesUpdates(MarketDataMessage) : bool

Support candles subscription and live updates.

subscription
MarketDataMessage

Devuelve: Check result.

Load(SettingsStorage)

Load settings.

storage
Settings storage.
OnCandlesSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for candles data. Override to provide implementation for candles subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

OnLevel1SubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for level1 data. Override to provide implementation for level1 subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

OnMarketDepthSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for market depth data. Override to provide implementation for market depth subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

OnNewsSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for news data. Override to provide implementation for news subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

OnOrderLogSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for order log (trades/transactions) data. Override to provide implementation for order log subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

OnPropertyChanged(string)

Raise PropertyChanged event.

propertyName
The name of the property that changed.
OnSendInMessageAsync(Message, CancellationToken) : ValueTask

Send in message handler.

message
Message
cancellationToken
CancellationToken

Devuelve: ValueTask

OnTFCandlesSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for time-frame candles (TF candles) data. Override to provide implementation for TF candles subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

OnTicksSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask

Handles subscription request for ticks data. Override to provide implementation for ticks subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Devuelve: A ValueTask representing the asynchronous operation.

Save(SettingsStorage)

Save settings.

storage
Settings storage.
SendInMessageAsync(Message, CancellationToken) : ValueTask

Processes a generic message asynchronously.

message
The message to process.
cancellationToken
CancellationToken
SendOutConnectionStateAsync(ConnectionStates, CancellationToken) : ValueTask

Send to CancellationToken) connection state message.

state
ConnectionStates
cancellationToken
Cancellation token.
SendOutDisconnectMessageAsync(bool, CancellationToken) : ValueTask

Send to CancellationToken) disconnect message.

expected
Is disconnect expected.
cancellationToken
Cancellation token.
SendOutDisconnectMessageAsync(Exception, CancellationToken) : ValueTask

Send to CancellationToken) disconnect message.

error
Error info. Can be .
cancellationToken
Cancellation token.
SendOutErrorAsync(string, CancellationToken) : ValueTask

Initialize a new message ErrorMessage and pass it to the method CancellationToken).

description
Error details.
cancellationToken
Cancellation token.
SendOutErrorAsync(Exception, CancellationToken) : ValueTask

Initialize a new message ErrorMessage and pass it to the method CancellationToken).

error
Error details.
cancellationToken
Cancellation token.
SendOutMessageAsync(Message, CancellationToken) : ValueTask

Send outgoing message (state change, order, etc.).

message
Message.
cancellationToken
CancellationToken
SendSubscriptionFinishedAsync(long, CancellationToken, DateTime?) : ValueTask

Initialize a new message SubscriptionFinishedMessage and pass it to the method CancellationToken).

originalTransactionId
ID of the original message for which this message is a response.
cancellationToken
Cancellation token.
nextFrom
NextFrom.
SendSubscriptionNotSupportedAsync(long, CancellationToken) : ValueTask

Initialize a new message SubscriptionResponseMessage and pass it to the method CancellationToken).

originalTransactionId
ID of the original message for which this message is a response.
cancellationToken
Cancellation token.
SendSubscriptionOnlineAsync(long, CancellationToken) : ValueTask

Initialize a new message SubscriptionOnlineMessage and pass it to the method CancellationToken).

originalTransactionId
ID of the original message for which this message is a response.
cancellationToken
Cancellation token.
SendSubscriptionReplyAsync(long, CancellationToken, Exception) : ValueTask

Initialize a new message SubscriptionResponseMessage and pass it to the method CancellationToken).

originalTransactionId
ID of the original message for which this message is a response.
cancellationToken
Cancellation token.
error
Subscribe or unsubscribe error info. To be set if the answer.
SendSubscriptionResultAsync(ISubscriptionMessage, CancellationToken) : ValueTask

Initialize a new message SubscriptionOnlineMessage or SubscriptionFinishedMessage and pass it to the method CancellationToken).

message
Subscription.
cancellationToken
Cancellation token.
ValidateSecurityId(SecurityId) : bool

Validate the specified security id is supported by the adapter and subscription can be done.

secId
SecurityId.

Devuelve: Check result.

Eventos