IOrderLifecycleManager

StockSharp.MatchingEngine

Manages order lifecycle (active orders, expiry, etc.).

属性

Count : int

Count of active orders.

方法

Clear()

Clear all orders.

GetActiveOrders() : IEnumerable<EmulatorOrder>

Get all active orders.

返回值: Enumeration of all active orders.

GetActiveOrders(string) : IEnumerable<EmulatorOrder>

Get all active orders for a portfolio.

portfolioName
Portfolio name to filter active orders.

返回值: Active orders for the specified portfolio.

GetActiveOrders(SecurityId) : IEnumerable<EmulatorOrder>

Get all active orders for a security.

securityId
Security identifier to filter active orders.

返回值: Active orders for the specified security.

GetActiveOrders(string, SecurityId?, Sides?) : IEnumerable<EmulatorOrder>

Get all active orders matching filter.

portfolioName
Optional portfolio name filter.
securityId
Optional security id filter.
side
Optional side filter.

返回值: Active orders matching the specified filters.

GetExpiredOrders(DateTime) : IEnumerable<EmulatorOrder>

Get orders that have expired as of the given time.

currentTime
Time to check expirations against.

返回值: Expired orders at the specified time.

GetOrder(long) : EmulatorOrder

Get an active order by transaction ID.

transactionId
Transaction id of the order to retrieve.

返回值: The matching EmulatorOrder or null if not found.

ProcessTime(DateTime) : IEnumerable<EmulatorOrder>

Process time passage and return expired orders.

currentTime
Current time to process expiries.

返回值: Orders that expired during processing.

RegisterOrder(EmulatorOrder, DateTime) : bool

Register a new active order.

order
Order to register.
currentTime
Current time for expiry calculation.

返回值: True if registered, false if already exists.

RemoveOrder(long) : bool

Remove an order from active orders.

transactionId
Transaction id of the order to remove.

返回值: True if removed, false if not found.

TryGetOrder(long, EmulatorOrder) : bool

Try to get an active order by transaction ID.

transactionId
Transaction id to look up.
order
When method returns true, contains the found order.

返回值: True if order was found, otherwise false.

TryRemoveOrder(long, EmulatorOrder) : bool

Remove and return an order.

transactionId
Transaction id of the order to remove.
order
When method returns true, contains the removed order.

返回值: True if the order was removed, otherwise false.