RemoteStorageClient
StockSharp.Algo.Storages
访问历史服务器的客户端 。
继承自: Disposable
构造函数
RemoteStorageClient
public RemoteStorageClient(IMessageAdapter adapter, int securityBatchSize)
remoteStorageClient = RemoteStorageClient(adapter, securityBatchSize)
初始化了 & ##RemoteStorageClient+#的新实例.
- adapter
- 消息适应器.
- securityBatchSize
- 新仪器要求块大小 。
方法
DeleteAsync
public ValueTask DeleteAsync(SecurityId securityId, DataType dataType, StorageFormats format, DateTime date, CancellationToken cancellationToken)
result = remoteStorageClient.DeleteAsync(securityId, dataType, format, date, cancellationToken)
从存储中移除指定日期的市场数据。
- securityId
- 金融工具标识。
- dataType
- 数据类型信息.
- format
- 存储格式.
- date
- 约会
- cancellationToken
- CancellationToken
返回值: ValueTask
GetAvailableDataTypesAsync
public IAsyncEnumerable<DataType> GetAvailableDataTypesAsync(SecurityId securityId, StorageFormats format)
result = remoteStorageClient.GetAvailableDataTypesAsync(securityId, format)
获取所有可用的数据类型 。
- securityId
- 仪器识别符.
- format
- 格式类型。
返回值: 数据类型.
GetAvailableSecuritiesAsync
public IAsyncEnumerable<SecurityId> GetAvailableSecuritiesAsync()
result = remoteStorageClient.GetAvailableSecuritiesAsync()
获取所有可用的乐器作为合成流 。
返回值: 现有仪器。
GetDatesAsync
public ValueTask<IEnumerable<DateTime>> GetDatesAsync(SecurityId securityId, DataType dataType, StorageFormats format, CancellationToken cancellationToken)
result = remoteStorageClient.GetDatesAsync(securityId, dataType, format, cancellationToken)
以获得所有记录市场数据的日期。
- securityId
- 金融工具标识。
- dataType
- 数据类型信息.
- format
- 存储格式.
- cancellationToken
- CancellationToken
返回值: 约会
LoadStreamAsync
public ValueTask<Stream> LoadStreamAsync(SecurityId securityId, DataType dataType, StorageFormats format, DateTime date, CancellationToken cancellationToken)
result = remoteStorageClient.LoadStreamAsync(securityId, dataType, format, date, cancellationToken)
要以 StockSharp 存储格式加载数据 。
- securityId
- 金融工具标识。
- dataType
- 数据类型信息.
- format
- 存储格式.
- date
- 约会
- cancellationToken
- CancellationToken
返回值: 以 StockSharp 存储格式的数据。 如果没有数据, 将返回 Null 。
LookupBoardsAsync
public IAsyncEnumerable<BoardMessage> LookupBoardsAsync(BoardLookupMessage criteria)
result = remoteStorageClient.LookupBoardsAsync(criteria)
按指定标准下载板.
- criteria
- 信件板查找指定标准 。
返回值: 被找到的花板的顺序
LookupSecuritiesAsync
public IAsyncEnumerable<SecurityMessage> LookupSecuritiesAsync(SecurityLookupMessage criteria, ISecurityProvider securityProvider)
result = remoteStorageClient.LookupSecuritiesAsync(criteria, securityProvider)
以规定标准下载金融工具.
- criteria
- 信件金融工具查找指定标准 。
- securityProvider
- 提供各种文书的信息。
返回值: 所出出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出
SaveSecuritiesAsync
public ValueTask SaveSecuritiesAsync(IEnumerable<SecurityMessage> securities, CancellationToken cancellationToken)
result = remoteStorageClient.SaveSecuritiesAsync(securities, cancellationToken)
节省金融工具。
- securities
- 金融工具。
- cancellationToken
- CancellationToken
返回值: ValueTask
SaveStreamAsync
public ValueTask SaveStreamAsync(SecurityId securityId, DataType dataType, StorageFormats format, DateTime date, Stream stream, CancellationToken cancellationToken)
result = remoteStorageClient.SaveStreamAsync(securityId, dataType, format, date, stream, cancellationToken)
要以 StockSharp 存储格式保存数据 。
- securityId
- 金融工具标识。
- dataType
- 数据类型信息.
- format
- 存储格式.
- date
- 约会
- stream
- cancellationToken
- CancellationToken
返回值: ValueTask
VerifyAsync
public ValueTask VerifyAsync(CancellationToken cancellationToken)
result = remoteStorageClient.VerifyAsync(cancellationToken)
验证连接到服务器。 连接然后断开, 测试连接 。
- cancellationToken
- CancellationToken
返回值: ValueTask