IMarketDataStorageDrive

StockSharp.Algo.Storages

The interface, describing the storage, associated with IMarketDataStorage.

Properties

Drive
public IMarketDataDrive Drive { get; }
value = iMarketDataStorageDrive.Drive

The storage (database, file etc.).

Methods

ClearDatesCacheAsync
public ValueTask ClearDatesCacheAsync(CancellationToken cancellationToken)
result = iMarketDataStorageDrive.ClearDatesCacheAsync(cancellationToken)

To delete cache-files, containing information on available time ranges.

cancellationToken
CancellationToken

Returns: ValueTask

DeleteAsync
public ValueTask DeleteAsync(DateTime date, CancellationToken cancellationToken)
result = iMarketDataStorageDrive.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 = iMarketDataStorageDrive.GetDatesAsync()

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

Returns: Available dates.

LoadStreamAsync
public ValueTask<Stream> LoadStreamAsync(DateTime date, bool readOnly, CancellationToken cancellationToken)
result = iMarketDataStorageDrive.LoadStreamAsync(date, readOnly, cancellationToken)

To load data in the format of StockSharp storage.

date
Date, for which data shall be loaded.
readOnly
Get stream in read mode only.
cancellationToken
CancellationToken

Returns: Data in the format of StockSharp storage. If no data exists, Null will be returned.

SaveStreamAsync
public ValueTask SaveStreamAsync(DateTime date, Stream stream, CancellationToken cancellationToken)
result = iMarketDataStorageDrive.SaveStreamAsync(date, stream, cancellationToken)

To save data in the format of StockSharp storage.

date
The date, for which data shall be saved.
stream
Data in the format of StockSharp storage.
cancellationToken
CancellationToken

Returns: ValueTask