EntityCache

StockSharp.Algo

Entity cache for storing orders, trades, news and other trading entities.

実装: ISnapshotHolder

コンストラクター

EntityCache(ILogReceiver, Func<SecurityId?, Security>, IExchangeInfoProvider, IPositionProvider)

Entity cache for storing orders, trades, news and other trading entities.

logReceiver
Log receiver for logging messages.
tryGetSecurity
Function to get security by id.
exchangeInfoProvider
Exchange info provider.
positionProvider
Position provider.

プロパティ

ExchangeInfoProvider : IExchangeInfoProvider

Exchange info provider.

MyTrades : IEnumerable<MyTrade>

All own trades.

News : IEnumerable<News>

All news.

OrderCancelFails : IEnumerable<OrderFail>

Order cancellation failures.

OrderEditFails : IEnumerable<OrderFail>

Order modification failures.

OrderRegisterFails : IEnumerable<OrderFail>

Order registration failures.

Orders : IEnumerable<Order>

All orders.

OrdersKeepCount : int

Maximum number of orders to keep in cache. Default is 1000.

メソッド

AddFail(OrderOperations, OrderFail)

Add order fail.

operation
Operation.
fail
Fail.
AddOrderByCancelationId(Order, long)

Add order by cancelation transaction id.

order
Order.
transactionId
Transaction id.
AddOrderByEditionId(Order, long)

Add order by edition transaction id.

order
Order.
transactionId
Transaction id.
AddOrderByRegistrationId(Order)

Add order by registration transaction id.

order
Order.
AddOrderFailById(OrderFail, OrderOperations, long)

Add order fail by transaction id.

fail
Order fail.
operation
Order operation.
transactionId
Transaction id.
AddOrderStatusTransactionId(long)

Add order status transaction id.

transactionId
Transaction id.
Clear()

Clear all cached data.

GetLevel1Fields(Security) : IEnumerable<Level1Fields>

Get available Level1 fields for security.

security
Security.

戻り値: Fields.

GetOrders(Security, OrderStates) : IEnumerable<Order>

Get orders by security and state.

security
Security.
state
Order state.

戻り値: Orders.

GetSecurityValue(Security, Level1Fields) : object

Get security Level1 field value.

security
Security.
field
Field.

戻り値: Value.

GetSecurityValues(Security, DateTime) : Level1Info

Get or create Level1 info for security.

security
Security.
serverTime
Server time.

戻り値: Level1 info.

HasLevel1Info(Security) : bool

Check if security has Level1 info.

security
Security.

戻り値: if has info.

IsMassCancelation(long) : bool

Check if transaction is mass cancelation.

transactionId
Transaction id.

戻り値: if mass cancelation.

IsOrderStatusRequest(long) : bool

Check if transaction is order status request.

transactionId
Transaction id.

戻り値: if order status request.

ProcessNewsMessage(Security, NewsMessage) : ValueTuple<News, bool>

Process news message.

security
Security.
message
Message.

戻り値: News and is new flag.

ProcessOrderFailMessage(Order, Security, ExecutionMessage) : IEnumerable<ValueTuple<OrderFail, OrderOperations>>

Process order fail message.

order
Order.
security
Security.
message
Message.

戻り値: Order fails with operations.

ProcessOrderMessage(Order, Security, ExecutionMessage, long, Func<string, Portfolio>) : IEnumerable<OrderChangeInfo>

Process order message.

order
Order.
security
Security.
message
Message.
transactionId
Transaction id.
getPortfolio
Function to get portfolio.

戻り値: Order change info.

ProcessOwnTradeMessage(Order, Security, ExecutionMessage, long) : ValueTuple<MyTrade, bool>

Process own trade message.

order
Order.
security
Security.
message
Message.
transactionId
Transaction id.

戻り値: Trade and is new flag.

RemoveOrderStatusTransactionId(long)

Remove order status transaction id.

transactionId
Transaction id.
TryAddMassCancelationId(long)

Try add mass cancelation transaction id.

transactionId
Transaction id.
TryGetAdapter(Order) : IMessageAdapter

Try get message adapter for order.

order
Order.

戻り値: Adapter or .

TryGetOrder(long?, string) : Order

Try get order by id.

orderId
Order id.
orderStringId
Order string id.

戻り値: Order or .

TryGetOrder(long, OrderOperations) : Order

Try get order by transaction id and operation.

transactionId
Transaction id.
operation
Operation.

戻り値: Order or .

TrySetAdapter(Order, IMessageAdapter)

Try set message adapter for order.

order
Order.
adapter
Adapter.
UpdateOrderBookSnapshot(QuoteChangeMessage)

Update cached order book snapshot for a security.

message
Order book message.