HistoryMessageAdapter
The adapter, receiving messages form the storage IStorageRegistry.
Inherits: MessageAdapter
Implements: IEmulationMessageAdapter, IMessageAdapter, IMessageTransport, IPersistable, ILogReceiver, ILogSource, IDisposable, ICloneable<IMessageAdapter>, ICloneable
Constructors
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
public MarketDataStorageCache AdapterCache { get; set; }
value = historyMessageAdapter.AdapterCache
historyMessageAdapter.AdapterCache = value
MarketDataStorageCache.
public bool CheckTradableDates { get; set; }
value = historyMessageAdapter.CheckTradableDates
historyMessageAdapter.CheckTradableDates = value
Check loading dates are they tradable.
public override DateTime CurrentTime { get; }
value = historyMessageAdapter.CurrentTime
Current UTC time.
public IMarketDataDrive Drive { get; set; }
value = historyMessageAdapter.Drive
historyMessageAdapter.Drive = value
The storage which is used by default.
public override bool IsFullCandlesOnly { get; }
value = historyMessageAdapter.IsFullCandlesOnly
Translates CandleMessage as only fully filled.
public int LoadedMessageCount { get; }
value = historyMessageAdapter.LoadedMessageCount
The number of loaded events.
public TimeSpan MarketTimeChangedInterval { get; set; }
value = historyMessageAdapter.MarketTimeChangedInterval
historyMessageAdapter.MarketTimeChangedInterval = value
The interval of message TimeMessage generation.
public IDictionary<SecurityId, IOrderLogMarketDepthBuilder> OrderLogMarketDepthBuilders { get; }
value = historyMessageAdapter.OrderLogMarketDepthBuilders
Order book builders.
public int PostTradeMarketTimeChangedCount { get; set; }
value = historyMessageAdapter.PostTradeMarketTimeChangedCount
historyMessageAdapter.PostTradeMarketTimeChangedCount = value
The number of the event CurrentTimeChanged calls after end of trading.
public ISecurityProvider SecurityProvider { get; }
value = historyMessageAdapter.SecurityProvider
The provider of information about instruments.
public DateTime StartDate { get; set; }
value = historyMessageAdapter.StartDate
historyMessageAdapter.StartDate = value
Date in history for starting the paper trading.
public DateTime StopDate { get; set; }
value = historyMessageAdapter.StopDate
historyMessageAdapter.StopDate = value
Date in history to stop the paper trading (date is included).
public MarketDataStorageCache StorageCache { get; set; }
value = historyMessageAdapter.StorageCache
historyMessageAdapter.StorageCache = value
Cache.
public StorageFormats StorageFormat { get; set; }
value = historyMessageAdapter.StorageFormat
historyMessageAdapter.StorageFormat = value
The format of market data.
public IStorageRegistry StorageRegistry { get; set; }
value = historyMessageAdapter.StorageRegistry
historyMessageAdapter.StorageRegistry = value
Market data storage.
public override bool UseOutChannel { get; }
value = historyMessageAdapter.UseOutChannel
Use channels for out messages.
Methods
public override IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)
result = historyMessageAdapter.CreateOrderLogMarketDepthBuilder(securityId)
Create market depth builder.
- securityId
- Security ID.
Returns: Order log to market depth builder.
protected override void DisposeManaged()
historyMessageAdapter.DisposeManaged()
Release resources.
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.
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.
public override bool IsSupportCandlesUpdates(MarketDataMessage subscription)
result = historyMessageAdapter.IsSupportCandlesUpdates(subscription)
Support candles subscription and live updates.
- subscription
- MarketDataMessage
Returns: Check result.
protected override ValueTask OnSendInMessageAsync(Message message, CancellationToken cancellationToken)
result = historyMessageAdapter.OnSendInMessageAsync(message, cancellationToken)
Send in message handler.
- message
- Message
- cancellationToken
- CancellationToken
Returns: ValueTask
public override string ToString()
result = historyMessageAdapter.ToString()
Преобразовать к строковому представлению.
Returns: Строковое представление.