LocalMarketDataDrive

StockSharp.Algo.Storages

The file storage for market data.

继承自: BaseMarketDataDrive

构造函数

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.

属性

AvailableSecurities : IEnumerable<SecurityId>

Available securities.

Path : string

Path to market data.

方法

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

返回值: Task

GetAvailableDataTypesAsync(SecurityId, StorageFormats) : IAsyncEnumerable<DataType>

Get all available data types.

securityId
Instrument identifier.
format
Format type.

返回值: Data types.

GetAvailableSecuritiesAsync() : IAsyncEnumerable<SecurityId>

Get all available instruments.

返回值: Available instruments.

GetDataType(string) : DataType

Get data type and parameter for the specified file name.

fileName
The file name.

返回值: Data type and parameter associated with the type. For example, candle arg.

GetDate(string) : DateTime

Convert directory name to the date.

dirName
Directory name.

返回值: The date.

GetDirName(DateTime) : string

Convert the date to directory name.

date
The date.

返回值: Directory name.

GetExtension(StorageFormats) : string

To get the file extension for the format.

format
Format.

返回值: 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.

返回值: The file name.

GetSecurityPath(SecurityId) : string

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

securityId
Security ID.

返回值: 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.

返回值: 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.

返回值: The sequence of found instruments.

TrySaveIndex(TimeSpan) : TimeSpan?

Try save existing index.

diff
Time diff from prev index change.

返回值: Time taken by build process. means no build happened.

VerifyAsync(CancellationToken) : ValueTask

Verify settings.

cancellationToken
CancellationToken

返回值: ValueTask