Class RemoteStorageClient
- Namespace
- StockSharp.Algo.Storages.Remote
- Assembly
- StockSharp.Algo.dll
The client for access to the history server.
public class RemoteStorageClient : Disposable
- Inheritance
-
RemoteStorageClient
- Extension Methods
Constructors
RemoteStorageClient(IMessageAdapter, RemoteStorageCache, int, TimeSpan)
Initializes a new instance of the RemoteStorageClient.
public RemoteStorageClient(IMessageAdapter adapter, RemoteStorageCache cache, int securityBatchSize, TimeSpan timeout)
Parameters
adapter
IMessageAdapterMessage adapter.
cache
RemoteStorageCacheCache.
securityBatchSize
intThe new instruments request block size.
timeout
TimeSpanTimeout.
Properties
AvailableSecurities
Get all available instruments.
public IEnumerable<SecurityId> AvailableSecurities { get; }
Property Value
Methods
Delete(SecurityId, DataType, StorageFormats, DateTime)
To remove market data on specified date from the storage.
public void Delete(SecurityId securityId, DataType dataType, StorageFormats format, DateTime date)
Parameters
securityId
SecurityIdSecurity ID.
dataType
DataTypeData type info.
format
StorageFormatsStorage format.
date
DateTimeDate.
DisposeManaged()
protected override void DisposeManaged()
GetAvailableDataTypes(SecurityId, StorageFormats)
Get all available data types.
public IEnumerable<DataType> GetAvailableDataTypes(SecurityId securityId, StorageFormats format)
Parameters
securityId
SecurityIdInstrument identifier.
format
StorageFormatsFormat type.
Returns
- IEnumerable<DataType>
Data types.
GetDates(SecurityId, DataType, StorageFormats)
To get all the dates for which market data are recorded.
public IEnumerable<DateTime> GetDates(SecurityId securityId, DataType dataType, StorageFormats format)
Parameters
securityId
SecurityIdSecurity ID.
dataType
DataTypeData type info.
format
StorageFormatsStorage format.
Returns
- IEnumerable<DateTime>
Dates.
LoadExchangeBoards(BoardLookupMessage)
To find exchange boards that match the filter criteria
.
public IEnumerable<BoardMessage> LoadExchangeBoards(BoardLookupMessage criteria)
Parameters
criteria
BoardLookupMessageMessage boards lookup for specified criteria.
Returns
- IEnumerable<BoardMessage>
Exchange boards.
LoadSecurities(SecurityLookupMessage)
To find securities that match the filter criteria
.
public SecurityMessage[] LoadSecurities(SecurityLookupMessage criteria)
Parameters
criteria
SecurityLookupMessageMessage security lookup for specified criteria.
Returns
- SecurityMessage[]
Securities.
LoadStream(SecurityId, DataType, StorageFormats, DateTime)
To load data in the format of StockSharp storage.
public Stream LoadStream(SecurityId securityId, DataType dataType, StorageFormats format, DateTime date)
Parameters
securityId
SecurityIdSecurity ID.
dataType
DataTypeData type info.
format
StorageFormatsStorage format.
date
DateTimeDate.
Returns
LookupSecurities(SecurityLookupMessage, ISecurityProvider, Action<SecurityMessage>, Func<bool>, Action<int, int>)
Download securities by the specified criteria.
public void LookupSecurities(SecurityLookupMessage criteria, ISecurityProvider securityProvider, Action<SecurityMessage> newSecurity, Func<bool> isCancelled, Action<int, int> updateProgress)
Parameters
criteria
SecurityLookupMessageMessage security lookup for specified criteria.
securityProvider
ISecurityProviderThe provider of information about instruments.
newSecurity
Action<SecurityMessage>The handler through which a new instrument will be passed.
isCancelled
Func<bool>The handler which returns an attribute of search cancel.
updateProgress
Action<int, int>The handler through which a progress change will be passed.
SaveSecurities(IEnumerable<SecurityMessage>)
Save securities.
public void SaveSecurities(IEnumerable<SecurityMessage> securities)
Parameters
securities
IEnumerable<SecurityMessage>Securities.
SaveStream(SecurityId, DataType, StorageFormats, DateTime, Stream)
To save data in the format of StockSharp storage.
public void SaveStream(SecurityId securityId, DataType dataType, StorageFormats format, DateTime date, Stream stream)
Parameters
securityId
SecurityIdSecurity ID.
dataType
DataTypeData type info.
format
StorageFormatsStorage format.
date
DateTimeDate.
stream
Stream
Verify()
Verify.
public void Verify()