Table of Contents

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 IMessageAdapter

Message adapter.

cache RemoteStorageCache

Cache.

securityBatchSize int

The new instruments request block size.

timeout TimeSpan

Timeout.

Properties

AvailableSecurities

Get all available instruments.

public IEnumerable<SecurityId> AvailableSecurities { get; }

Property Value

IEnumerable<SecurityId>

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 SecurityId

Security ID.

dataType DataType

Data type info.

format StorageFormats

Storage format.

date DateTime

Date.

DisposeManaged()

protected override void DisposeManaged()

GetAvailableDataTypes(SecurityId, StorageFormats)

Get all available data types.

public IEnumerable<DataType> GetAvailableDataTypes(SecurityId securityId, StorageFormats format)

Parameters

securityId SecurityId

Instrument identifier.

format StorageFormats

Format 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 SecurityId

Security ID.

dataType DataType

Data type info.

format StorageFormats

Storage format.

Returns

IEnumerable<DateTime>

Dates.

LoadExchangeBoards(BoardLookupMessage)

To find exchange boards that match the filter criteria.

public IEnumerable<BoardMessage> LoadExchangeBoards(BoardLookupMessage criteria)

Parameters

criteria BoardLookupMessage

Message 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 SecurityLookupMessage

Message 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 SecurityId

Security ID.

dataType DataType

Data type info.

format StorageFormats

Storage format.

date DateTime

Date.

Returns

Stream

Data in the format of StockSharp storage. If no data exists, Null will be returned.

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 SecurityLookupMessage

Message security lookup for specified criteria.

securityProvider ISecurityProvider

The 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 SecurityId

Security ID.

dataType DataType

Data type info.

format StorageFormats

Storage format.

date DateTime

Date.

stream Stream

Verify()

Verify.

public void Verify()