Class StorageRegistry
- Namespace
- StockSharp.Algo.Storages
- Assembly
- StockSharp.Algo.dll
The storage of market data.
public class StorageRegistry : Disposable, IStorageRegistry, IMessageStorageRegistry
- Inheritance
-
StorageRegistry
- Implements
- Extension Methods
Constructors
StorageRegistry()
Initializes a new instance of the StorageRegistry.
public StorageRegistry()
StorageRegistry(IExchangeInfoProvider)
Initializes a new instance of the StorageRegistry.
public StorageRegistry(IExchangeInfoProvider exchangeInfoProvider)
Parameters
exchangeInfoProvider
IExchangeInfoProviderExchanges and trading boards provider.
Properties
DefaultDrive
The storage used by default.
public virtual IMarketDataDrive DefaultDrive { get; set; }
Property Value
ExchangeInfoProvider
Exchanges and trading boards provider.
public IExchangeInfoProvider ExchangeInfoProvider { get; }
Property Value
Methods
DisposeManaged()
Release resources.
protected override void DisposeManaged()
GetBoardStateMessageStorage(IMarketDataDrive, StorageFormats)
To get board state storage.
public IMarketDataStorage<BoardStateMessage> GetBoardStateMessageStorage(IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<BoardStateMessage>
The news storage.
GetCandleMessageStorage(Type, SecurityId, object, IMarketDataDrive, StorageFormats)
To get the candles storage for the specified instrument.
public IMarketDataStorage<CandleMessage> GetCandleMessageStorage(Type candleMessageType, SecurityId securityId, object arg, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
candleMessageType
TypeThe type of candle message.
securityId
SecurityIdSecurity ID.
arg
objectCandle arg.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<CandleMessage>
The candles storage.
GetExecutionMessageStorage(SecurityId, ExecutionTypes, IMarketDataDrive, StorageFormats)
To get the ExecutionMessage storage for the specified instrument.
public IMarketDataStorage<ExecutionMessage> GetExecutionMessageStorage(SecurityId securityId, ExecutionTypes type, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
type
ExecutionTypesData type, information about which is contained in the ExecutionMessage.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<ExecutionMessage>
The ExecutionMessage storage.
GetLevel1MessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of level1 data.
public IMarketDataStorage<Level1ChangeMessage> GetLevel1MessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<Level1ChangeMessage>
The storage of level1 data.
GetNewsMessageStorage(IMarketDataDrive, StorageFormats)
To get news storage.
public IMarketDataStorage<NewsMessage> GetNewsMessageStorage(IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<NewsMessage>
The news storage.
GetOrderLogMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of orders log for the specified instrument.
public IMarketDataStorage<ExecutionMessage> GetOrderLogMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<ExecutionMessage>
The storage of orders log.
GetPositionMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of position changes data.
public IMarketDataStorage<PositionChangeMessage> GetPositionMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<PositionChangeMessage>
The storage of position changes data.
GetQuoteMessageStorage(SecurityId, IMarketDataDrive, StorageFormats, bool)
To get the storage of order books for the specified instrument.
public IMarketDataStorage<QuoteChangeMessage> GetQuoteMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary, bool passThroughOrderBookIncrement = false)
Parameters
securityId
SecurityIdSecurity ID.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
passThroughOrderBookIncrement
boolPass through incremental QuoteChangeMessage.
Returns
- IMarketDataStorage<QuoteChangeMessage>
The order books storage.
GetStorage(Security, Type, object, IMarketDataDrive, StorageFormats)
To get the market-data storage.
public IMarketDataStorage GetStorage(Security security, Type dataType, object arg, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
security
SecuritySecurity.
dataType
TypeMarket data type.
arg
objectThe parameter associated with the
dataType
type. For example, candle arg.drive
IMarketDataDriveThe storage. If a value is null, DefaultDrive will be used.
format
StorageFormatsThe format type. By default Binary is passed.
Returns
- IMarketDataStorage
Market-data storage.
GetStorage(SecurityId, Type, object, IMarketDataDrive, StorageFormats)
To get the market-data storage.
public IMarketDataStorage GetStorage(SecurityId securityId, Type dataType, object arg, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
dataType
TypeMarket data type.
arg
objectThe parameter associated with the
dataType
type. For example, candle arg.drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage
Market-data storage.
GetTickMessageStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the storage of tick trades for the specified instrument.
public IMarketDataStorage<ExecutionMessage> GetTickMessageStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<ExecutionMessage>
The storage of tick trades.
GetTransactionStorage(SecurityId, IMarketDataDrive, StorageFormats)
To get the transactions storage for the specified instrument.
public IMarketDataStorage<ExecutionMessage> GetTransactionStorage(SecurityId securityId, IMarketDataDrive drive = null, StorageFormats format = StorageFormats.Binary)
Parameters
securityId
SecurityIdSecurity ID.
drive
IMarketDataDriveThe storage.
format
StorageFormatsThe format type.
Returns
- IMarketDataStorage<ExecutionMessage>
The transactions storage.
RegisterCandleStorage(IMarketDataStorage<CandleMessage>)
To register the candles storage.
public void RegisterCandleStorage(IMarketDataStorage<CandleMessage> storage)
Parameters
storage
IMarketDataStorage<CandleMessage>The candles storage.
RegisterLevel1Storage(IMarketDataStorage<Level1ChangeMessage>)
To register the storage of level1 data.
public void RegisterLevel1Storage(IMarketDataStorage<Level1ChangeMessage> storage)
Parameters
storage
IMarketDataStorage<Level1ChangeMessage>The storage of level1 data.
RegisterMarketDepthStorage(IMarketDataStorage<QuoteChangeMessage>)
To register the order books storage.
public void RegisterMarketDepthStorage(IMarketDataStorage<QuoteChangeMessage> storage)
Parameters
storage
IMarketDataStorage<QuoteChangeMessage>The order books storage.
RegisterOrderLogStorage(IMarketDataStorage<ExecutionMessage>)
To register the order log storage.
public void RegisterOrderLogStorage(IMarketDataStorage<ExecutionMessage> storage)
Parameters
storage
IMarketDataStorage<ExecutionMessage>The storage of orders log.
RegisterPositionStorage(IMarketDataStorage<PositionChangeMessage>)
To register the storage of position changes data.
public void RegisterPositionStorage(IMarketDataStorage<PositionChangeMessage> storage)
Parameters
storage
IMarketDataStorage<PositionChangeMessage>The storage of position changes data.
RegisterTradeStorage(IMarketDataStorage<ExecutionMessage>)
To register tick trades storage.
public void RegisterTradeStorage(IMarketDataStorage<ExecutionMessage> storage)
Parameters
storage
IMarketDataStorage<ExecutionMessage>The storage of tick trades.