Class RemoteStorageClient
- Namespace
- StockSharp.Algo.Storages.Remote
- Assembly
- StockSharp.Algo.dll
The client for access to the history server.
public class RemoteStorageClient : Disposable, IDisposable
- Inheritance
-
RemoteStorageClient
- Implements
- Inherited Members
- 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
adapterIMessageAdapterMessage adapter.
cacheRemoteStorageCacheCache.
securityBatchSizeintThe new instruments request block size.
timeoutTimeSpanTimeout.
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
securityIdSecurityIdSecurity ID.
dataTypeDataTypeData type info.
formatStorageFormatsStorage format.
dateDateTimeDate.
DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
protected override void DisposeManaged()
GetAvailableDataTypes(SecurityId, StorageFormats)
Get all available data types.
public IEnumerable<DataType> GetAvailableDataTypes(SecurityId securityId, StorageFormats format)
Parameters
securityIdSecurityIdInstrument identifier.
formatStorageFormatsFormat 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
securityIdSecurityIdSecurity ID.
dataTypeDataTypeData type info.
formatStorageFormatsStorage format.
Returns
- IEnumerable<DateTime>
Dates.
LoadExchangeBoards(BoardLookupMessage)
To find exchange boards that match the filter criteria.
public IEnumerable<BoardMessage> LoadExchangeBoards(BoardLookupMessage criteria)
Parameters
criteriaBoardLookupMessageMessage 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
criteriaSecurityLookupMessageMessage 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
securityIdSecurityIdSecurity ID.
dataTypeDataTypeData type info.
formatStorageFormatsStorage format.
dateDateTimeDate.
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
criteriaSecurityLookupMessageMessage security lookup for specified criteria.
securityProviderISecurityProviderThe provider of information about instruments.
newSecurityAction<SecurityMessage>The handler through which a new instrument will be passed.
isCancelledFunc<bool>The handler which returns an attribute of search cancel.
updateProgressAction<int, int>The handler through which a progress change will be passed.
SaveSecurities(IEnumerable<SecurityMessage>)
Save securities.
public void SaveSecurities(IEnumerable<SecurityMessage> securities)
Parameters
securitiesIEnumerable<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
securityIdSecurityIdSecurity ID.
dataTypeDataTypeData type info.
formatStorageFormatsStorage format.
dateDateTimeDate.
streamStream
Verify()
Verify.
public void Verify()