EntityCache

StockSharp.Algo

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

Implementa: ISnapshotHolder

Construtores

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.

Propriedades

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.

Métodos

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.

Retorna: Fields.

GetOrders(Security, OrderStates) : IEnumerable<Order>

Get orders by security and state.

security
Security.
state
Order state.

Retorna: Orders.

GetSecurityValue(Security, Level1Fields) : object

Get security Level1 field value.

security
Security.
field
Field.

Retorna: Value.

GetSecurityValues(Security, DateTime) : Level1Info

Get or create Level1 info for security.

security
Security.
serverTime
Server time.

Retorna: Level1 info.

HasLevel1Info(Security) : bool

Check if security has Level1 info.

security
Security.

Retorna: if has info.

IsMassCancelation(long) : bool

Check if transaction is mass cancelation.

transactionId
Transaction id.

Retorna: if mass cancelation.

IsOrderStatusRequest(long) : bool

Check if transaction is order status request.

transactionId
Transaction id.

Retorna: if order status request.

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

Process news message.

security
Security.
message
Message.

Retorna: News and is new flag.

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

Process order fail message.

order
Order.
security
Security.
message
Message.

Retorna: 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.

Retorna: Order change info.

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

Process own trade message.

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

Retorna: 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.

Retorna: Adapter or .

TryGetOrder(long?, string) : Order

Try get order by id.

orderId
Order id.
orderStringId
Order string id.

Retorna: Order or .

TryGetOrder(long, OrderOperations) : Order

Try get order by transaction id and operation.

transactionId
Transaction id.
operation
Operation.

Retorna: 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.