Class StorageRegistry
The storage of market data.
Namespace: StockSharp.Algo.Storages
Assembly: StockSharp.Algo.dll
Syntax
public class StorageRegistry : Disposable, IStorageRegistry, IMessageStorageRegistry
Constructors
StorageRegistry()
Initializes a new instance of the StorageRegistry.
Declaration
public StorageRegistry()
StorageRegistry(IExchangeInfoProvider)
Initializes a new instance of the StorageRegistry.
Declaration
public StorageRegistry(IExchangeInfoProvider exchangeInfoProvider)
Parameters
Type | Name | Description |
---|---|---|
IExchangeInfoProvider | exchangeInfoProvider | Exchanges and trading boards provider. |
Properties
DefaultDrive
The storage used by default.
Declaration
public virtual IMarketDataDrive DefaultDrive { get; set; }
Property Value
Type | Description |
---|---|
IMarketDataDrive |
ExchangeInfoProvider
Exchanges and trading boards provider.
Declaration
public IExchangeInfoProvider ExchangeInfoProvider { get; }
Property Value
Type | Description |
---|---|
IExchangeInfoProvider |
Methods
DisposeManaged()
Release resources.
Declaration
protected override void DisposeManaged()
GetBoardStateMessageStorage(IMarketDataDrive, StorageFormats)
To get board state storage.
Declaration
public IMarketDataStorage<BoardStateMessage> GetBoardStateMessageStorage(IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<BoardStateMessage> | The news storage. |
GetCandleMessageStorage(Type, SecurityId, Object, IMarketDataDrive, StorageFormats)
To get the candles storage for the specified instrument.
Declaration
public IMarketDataStorage<CandleMessage> GetCandleMessageStorage(Type candleMessageType, SecurityId securityId, object arg, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
Type | candleMessageType | The type of candle message. |
SecurityId | securityId | Security ID. |
Object | arg | Candle arg. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<CandleMessage> | The candles storage. |
GetCandleStorage(Type, Security, Object, IMarketDataDrive, StorageFormats)
To get the candles storage for the specified instrument.
Declaration
public IEntityMarketDataStorage<Candle, CandleMessage> GetCandleStorage(Type candleType, Security security, object arg, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
Type | candleType | The candle type. |
Security | security | Security. |
Object | arg | Candle arg. |
IMarketDataDrive | drive | The storage. If a value is null, DefaultDrive will be used. |
StorageFormats | format | The format type. By default Binary is passed. |
Returns
Type | Description |
---|---|
IEntityMarketDataStorage<Candle, CandleMessage> | The candles storage. |
GetExecutionMessageStorage(SecurityId, ExecutionTypes, IMarketDataDrive, StorageFormats)
To get the ExecutionMessage storage for the specified instrument.
Declaration
public IMarketDataStorage<ExecutionMessage> GetExecutionMessageStorage(SecurityId securityId, ExecutionTypes type, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
ExecutionTypes | type | Data type, information about which is contained in the ExecutionMessage. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<ExecutionMessage> | The ExecutionMessage storage. |
GetLevel1MessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of level1 data.
Declaration
public IMarketDataStorage<Level1ChangeMessage> GetLevel1MessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<Level1ChangeMessage> | The storage of level1 data. |
GetMarketDepthStorage(Security, IMarketDataDrive, StorageFormats)
To get the storage of order books for the specified instrument.
Declaration
public IEntityMarketDataStorage<MarketDepth, QuoteChangeMessage> GetMarketDepthStorage(Security security, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
Security | security | Security. |
IMarketDataDrive | drive | The storage. If a value is null, DefaultDrive will be used. |
StorageFormats | format | The format type. By default Binary is passed. |
Returns
Type | Description |
---|---|
IEntityMarketDataStorage<MarketDepth, QuoteChangeMessage> | The order books storage. |
GetNewsMessageStorage(IMarketDataDrive, StorageFormats)
To get news storage.
Declaration
public IMarketDataStorage<NewsMessage> GetNewsMessageStorage(IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<NewsMessage> | The news storage. |
GetNewsStorage(IMarketDataDrive, StorageFormats)
To get news storage.
Declaration
public IEntityMarketDataStorage<News, NewsMessage> GetNewsStorage(IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataDrive | drive | The storage. If a value is null, DefaultDrive will be used. |
StorageFormats | format | The format type. By default Binary is passed. |
Returns
Type | Description |
---|---|
IEntityMarketDataStorage<News, NewsMessage> | The news storage. |
GetOrderLogMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of orders log for the specified instrument.
Declaration
public IMarketDataStorage<ExecutionMessage> GetOrderLogMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<ExecutionMessage> | The storage of orders log. |
GetOrderLogStorage(Security, IMarketDataDrive, StorageFormats)
To get the storage of orders log for the specified instrument.
Declaration
public IEntityMarketDataStorage<OrderLogItem, ExecutionMessage> GetOrderLogStorage(Security security, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
Security | security | Security. |
IMarketDataDrive | drive | The storage. If a value is null, DefaultDrive will be used. |
StorageFormats | format | The format type. By default Binary is passed. |
Returns
Type | Description |
---|---|
IEntityMarketDataStorage<OrderLogItem, ExecutionMessage> | The storage of orders log. |
GetPositionMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of position changes data.
Declaration
public IMarketDataStorage<PositionChangeMessage> GetPositionMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<PositionChangeMessage> | The storage of position changes data. |
GetQuoteMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of order books for the specified instrument.
Declaration
public IMarketDataStorage<QuoteChangeMessage> GetQuoteMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<QuoteChangeMessage> | The order books storage. |
GetStorage(Security, Type, Object, IMarketDataDrive, StorageFormats)
To get the market-data storage.
Declaration
public IMarketDataStorage GetStorage(Security security, Type dataType, object arg, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
Security | security | Security. |
Type | dataType | Market data type. |
Object | arg | The parameter associated with the |
IMarketDataDrive | drive | The storage. If a value is null, DefaultDrive will be used. |
StorageFormats | format | The format type. By default Binary is passed. |
Returns
Type | Description |
---|---|
IMarketDataStorage | Market-data storage. |
GetStorage(SecurityId, Type, Object, IMarketDataDrive, StorageFormats)
To get the market-data storage.
Declaration
public IMarketDataStorage GetStorage(SecurityId securityId, Type dataType, object arg, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
Type | dataType | Market data type. |
Object | arg | The parameter associated with the |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage | Market-data storage. |
GetTickMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of tick trades for the specified instrument.
Declaration
public IMarketDataStorage<ExecutionMessage> GetTickMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<ExecutionMessage> | The storage of tick trades. |
GetTradeStorage(Security, IMarketDataDrive, StorageFormats)
To get the storage of tick trades for the specified instrument.
Declaration
public IEntityMarketDataStorage<Trade, ExecutionMessage> GetTradeStorage(Security security, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
Security | security | Security. |
IMarketDataDrive | drive | The storage. If a value is null, DefaultDrive will be used. |
StorageFormats | format | The format type. By default Binary is passed. |
Returns
Type | Description |
---|---|
IEntityMarketDataStorage<Trade, ExecutionMessage> | The storage of tick trades. |
GetTransactionStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the transactions storage for the specified instrument.
Declaration
public IMarketDataStorage<ExecutionMessage> GetTransactionStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
IMarketDataDrive | drive | The storage. |
StorageFormats | format | The format type. |
Returns
Type | Description |
---|---|
IMarketDataStorage<ExecutionMessage> | The transactions storage. |
RegisterCandleStorage(IMarketDataStorage<CandleMessage>)
To register the candles storage.
Declaration
public void RegisterCandleStorage(IMarketDataStorage<CandleMessage> storage)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataStorage<CandleMessage> | storage | The candles storage. |
RegisterLevel1Storage(IMarketDataStorage<Level1ChangeMessage>)
To register the storage of level1 data.
Declaration
public void RegisterLevel1Storage(IMarketDataStorage<Level1ChangeMessage> storage)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataStorage<Level1ChangeMessage> | storage | The storage of level1 data. |
RegisterMarketDepthStorage(IMarketDataStorage<QuoteChangeMessage>)
To register the order books storage.
Declaration
public void RegisterMarketDepthStorage(IMarketDataStorage<QuoteChangeMessage> storage)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataStorage<QuoteChangeMessage> | storage | The order books storage. |
RegisterOrderLogStorage(IMarketDataStorage<ExecutionMessage>)
To register the order log storage.
Declaration
public void RegisterOrderLogStorage(IMarketDataStorage<ExecutionMessage> storage)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataStorage<ExecutionMessage> | storage | The storage of orders log. |
RegisterPositionStorage(IMarketDataStorage<PositionChangeMessage>)
To register the storage of position changes data.
Declaration
public void RegisterPositionStorage(IMarketDataStorage<PositionChangeMessage> storage)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataStorage<PositionChangeMessage> | storage | The storage of position changes data. |
RegisterTradeStorage(IMarketDataStorage<ExecutionMessage>)
To register tick trades storage.
Declaration
public void RegisterTradeStorage(IMarketDataStorage<ExecutionMessage> storage)
Parameters
Type | Name | Description |
---|---|---|
IMarketDataStorage<ExecutionMessage> | storage | The storage of tick trades. |