HistoryMessageAdapter

StockSharp.Algo.Testing

The adapter, receiving messages form the storage IStorageRegistry.

Inherits: MessageAdapter

Implements: IEmulationMessageAdapter, IMessageAdapter, IMessageTransport, IPersistable, ILogReceiver, ILogSource, IDisposable, ICloneable<IMessageAdapter>, ICloneable

Constructors

HistoryMessageAdapter
public HistoryMessageAdapter(IdGenerator transactionIdGenerator, ISecurityProvider securityProvider, IHistoryMarketDataManager marketDataManager)
historyMessageAdapter = HistoryMessageAdapter(transactionIdGenerator, securityProvider, marketDataManager)

Initializes a new instance of the HistoryMessageAdapter.

transactionIdGenerator
Transaction id generator.
securityProvider
The provider of information about instruments.
marketDataManager
Market data manager.

Properties

AdapterCache
public MarketDataStorageCache AdapterCache { get; set; }
value = historyMessageAdapter.AdapterCache
historyMessageAdapter.AdapterCache = value

MarketDataStorageCache.

CheckTradableDates
public bool CheckTradableDates { get; set; }
value = historyMessageAdapter.CheckTradableDates
historyMessageAdapter.CheckTradableDates = value

Check loading dates are they tradable.

CurrentTime
public override DateTime CurrentTime { get; }
value = historyMessageAdapter.CurrentTime

Current time, which will be passed to the Time.

Drive
public IMarketDataDrive Drive { get; set; }
value = historyMessageAdapter.Drive
historyMessageAdapter.Drive = value

The storage which is used by default.

IsFullCandlesOnly
public override bool IsFullCandlesOnly { get; }
value = historyMessageAdapter.IsFullCandlesOnly

Translates CandleMessage as only fully filled.

LoadedMessageCount
public int LoadedMessageCount { get; }
value = historyMessageAdapter.LoadedMessageCount

The number of loaded events.

MarketTimeChangedInterval
public TimeSpan MarketTimeChangedInterval { get; set; }
value = historyMessageAdapter.MarketTimeChangedInterval
historyMessageAdapter.MarketTimeChangedInterval = value

The interval of message TimeMessage generation.

OrderLogMarketDepthBuilders
public IDictionary<SecurityId, IOrderLogMarketDepthBuilder> OrderLogMarketDepthBuilders { get; }
value = historyMessageAdapter.OrderLogMarketDepthBuilders

Order book builders.

PostTradeMarketTimeChangedCount
public int PostTradeMarketTimeChangedCount { get; set; }
value = historyMessageAdapter.PostTradeMarketTimeChangedCount
historyMessageAdapter.PostTradeMarketTimeChangedCount = value

The number of the event CurrentTimeChanged calls after end of trading.

SecurityProvider
public ISecurityProvider SecurityProvider { get; }
value = historyMessageAdapter.SecurityProvider

The provider of information about instruments.

StartDate
public DateTime StartDate { get; set; }
value = historyMessageAdapter.StartDate
historyMessageAdapter.StartDate = value

Date in history for starting the paper trading.

StopDate
public DateTime StopDate { get; set; }
value = historyMessageAdapter.StopDate
historyMessageAdapter.StopDate = value

Date in history to stop the paper trading (date is included).

StorageCache
public MarketDataStorageCache StorageCache { get; set; }
value = historyMessageAdapter.StorageCache
historyMessageAdapter.StorageCache = value

Cache.

StorageFormat
public StorageFormats StorageFormat { get; set; }
value = historyMessageAdapter.StorageFormat
historyMessageAdapter.StorageFormat = value

The format of market data.

StorageRegistry
public IStorageRegistry StorageRegistry { get; set; }
value = historyMessageAdapter.StorageRegistry
historyMessageAdapter.StorageRegistry = value

Market data storage.

UseOutChannel
public override bool UseOutChannel { get; }
value = historyMessageAdapter.UseOutChannel

Use channels for out messages.

Methods

CreateOrderLogMarketDepthBuilder
public override IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)
result = historyMessageAdapter.CreateOrderLogMarketDepthBuilder(securityId)

Create market depth builder.

securityId
Security ID.

Returns: Order log to market depth builder.

DisposeManaged
protected override void DisposeManaged()
historyMessageAdapter.DisposeManaged()

Disposes the managed resources. Override this method to add custom clean up of managed resources.

GetSupportedMarketDataTypesAsync
public override IAsyncEnumerable<DataType> GetSupportedMarketDataTypesAsync(SecurityId securityId, DateTime? from, DateTime? to)
result = historyMessageAdapter.GetSupportedMarketDataTypesAsync(securityId, from, to)

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.

Returns: Supported by adapter market data types.

IsAllDownloadingSupported
public override bool IsAllDownloadingSupported(DataType dataType)
result = historyMessageAdapter.IsAllDownloadingSupported(dataType)

Is for the specified all securities downloading enabled.

dataType
Data type info.

Returns: Check result.

IsSupportCandlesUpdates
public override bool IsSupportCandlesUpdates(MarketDataMessage subscription)
result = historyMessageAdapter.IsSupportCandlesUpdates(subscription)

Support candles subscription and live updates.

subscription
MarketDataMessage

Returns: Check result.

OnSendInMessageAsync
protected override ValueTask OnSendInMessageAsync(Message message, CancellationToken cancellationToken)
result = historyMessageAdapter.OnSendInMessageAsync(message, cancellationToken)

Send in message handler.

message
Message
cancellationToken
CancellationToken

Returns: ValueTask

ToString
public override string ToString()
result = historyMessageAdapter.ToString()

Returns a string representation of the tuple, with values separated by commas.

Returns: A string representing the tuple's values.