LocalMarketDataDrive

StockSharp.Algo.Storages

The file storage for market data.

Inherits: BaseMarketDataDrive

Constructors

LocalMarketDataDrive()

Initializes a new instance of the LocalMarketDataDrive.

LocalMarketDataDrive(string)

Initializes a new instance of the LocalMarketDataDrive.

path
The path to the directory with data.
LocalMarketDataDrive(IFileSystem, string)

Initializes a new instance of the LocalMarketDataDrive.

fileSystem
File system abstraction.
path
The path to the directory with data.

Properties

AvailableSecurities : IEnumerable<SecurityId>

Available securities.

Path : string

Path to market data.

Methods

BuildIndexAsync(ILogReceiver, Action<int, int>, CancellationToken) : Task

Build an index for fast performance of accessing available data types from the storage.

logs
Logs. Can be .
updateProgress
Progress handler.
cancellationToken
CancellationToken

Returns: Task

GetAvailableDataTypesAsync(SecurityId, StorageFormats) : IAsyncEnumerable<DataType>

Get all available data types.

securityId
Instrument identifier.
format
Format type.

Returns: Data types.

GetAvailableSecuritiesAsync() : IAsyncEnumerable<SecurityId>

Get all available instruments.

Returns: Available instruments.

GetDataType(string) : DataType

Get data type and parameter for the specified file name.

fileName
The file name.

Returns: Data type and parameter associated with the type. For example, candle arg.

GetDate(string) : DateTime

Convert directory name to the date.

dirName
Directory name.

Returns: The date.

GetDirName(DateTime) : string

Convert the date to directory name.

date
The date.

Returns: Directory name.

GetExtension(StorageFormats) : string

To get the file extension for the format.

format
Format.

Returns: The extension.

GetFileName(DataType, StorageFormats?, bool) : string

To get the file name by the type of data.

dataType
Data type info.
format
Storage format. If set an extension will be added to the file name.
throwIfUnknown
Throw exception if the specified type is unknown.

Returns: The file name.

GetSecurityPath(SecurityId) : string

To get the path to the folder with market data for the instrument.

securityId
Security ID.

Returns: The path to the folder with market data.

GetStorageDrive(SecurityId, DataType, StorageFormats) : IMarketDataStorageDrive

To get the storage for IMarketDataStorage.

securityId
Security ID.
dataType
Data type info.
format
Format type.

Returns: Storage for IMarketDataStorage.

LookupSecuritiesAsync(SecurityLookupMessage, ISecurityProvider) : IAsyncEnumerable<SecurityMessage>

Download securities by the specified criteria.

criteria
Message security lookup for specified criteria.
securityProvider
The provider of information about instruments.

Returns: The sequence of found instruments.

TrySaveIndex(TimeSpan) : TimeSpan?

Try save existing index.

diff
Time diff from prev index change.

Returns: Time taken by build process. means no build happened.

VerifyAsync(CancellationToken) : ValueTask

Verify settings.

cancellationToken
CancellationToken

Returns: ValueTask