IMarketDataStorage
The interface, describing the storage of market data (ticks, order books etc.).
Properties
public bool AppendOnlyNew { get; set; }
value = iMarketDataStorage.AppendOnlyNew
iMarketDataStorage.AppendOnlyNew = value
Whether to add new data or attempt to record all data without filter.
public DataType DataType { get; }
value = iMarketDataStorage.DataType
The type of market-data, operated by given storage.
public IMarketDataStorageDrive Drive { get; }
value = iMarketDataStorage.Drive
The storage (database, file etc.).
public SecurityId SecurityId { get; }
value = iMarketDataStorage.SecurityId
The instrument, operated by the external storage.
public IMarketDataSerializer Serializer { get; }
value = iMarketDataStorage.Serializer
The serializer.
Methods
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
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
public IAsyncEnumerable<DateTime> GetDatesAsync()
result = iMarketDataStorage.GetDatesAsync()
To get all the dates for which market data are recorded.
Returns: Available dates.
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.
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.
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.