IMarketDataStorage

StockSharp.Algo.Storages

The interface, describing the storage of market data (ticks, order books etc.).

Properties

AppendOnlyNew
public bool AppendOnlyNew { get; set; }
value = iMarketDataStorage.AppendOnlyNew
iMarketDataStorage.AppendOnlyNew = value

Whether to add new data or attempt to record all data without filter.

DataType
public DataType DataType { get; }
value = iMarketDataStorage.DataType

The type of market-data, operated by given storage.

Drive
public IMarketDataStorageDrive Drive { get; }
value = iMarketDataStorage.Drive

The storage (database, file etc.).

SecurityId
public SecurityId SecurityId { get; }
value = iMarketDataStorage.SecurityId

The instrument, operated by the external storage.

Serializer
public IMarketDataSerializer Serializer { get; }
value = iMarketDataStorage.Serializer

The serializer.

Methods

DeleteAsync
public ValueTask DeleteAsync(IEnumerable<Message> data, CancellationToken cancellationToken)
result = iMarketDataStorage.DeleteAsync(data, cancellationToken)

To delete market data from storage.

data
Market data to be deleted.
cancellationToken
CancellationToken

Returns: ValueTask

DeleteAsync
public ValueTask DeleteAsync(DateTime date, CancellationToken cancellationToken)
result = iMarketDataStorage.DeleteAsync(date, cancellationToken)

To remove market data on specified date from the storage.

date
Date, for which all data shall be deleted.
cancellationToken
CancellationToken

Returns: ValueTask

GetDatesAsync
public IAsyncEnumerable<DateTime> GetDatesAsync()
result = iMarketDataStorage.GetDatesAsync()

To get all the dates for which market data are recorded.

Returns: Available dates.

GetMetaInfoAsync
public ValueTask<IMarketDataMetaInfo> GetMetaInfoAsync(DateTime date, CancellationToken cancellationToken)
result = iMarketDataStorage.GetMetaInfoAsync(date, cancellationToken)

To get meta-information on data.

date
Date, for which meta-information on data shall be received.
cancellationToken
CancellationToken

Returns: Meta-information on data. If there is no such date in history, will be returned.

LoadAsync
public IAsyncEnumerable<Message> LoadAsync(DateTime date)
result = iMarketDataStorage.LoadAsync(date)

To load data.

date
Date, for which data shall be loaded.

Returns: Data. If there is no data, the empty set will be returned.

SaveAsync
public ValueTask<int> SaveAsync(IEnumerable<Message> data, CancellationToken cancellationToken)
result = iMarketDataStorage.SaveAsync(data, cancellationToken)

To save market data in storage.

data
Market data.
cancellationToken
CancellationToken

Returns: Count of saved data.