MatchingEngineAdapter
Message-based matching engine adapter. Contains pure matching logic without emulation (no random, no candle matching, no commissions). Implements IMessageTransport for message-based integration.
Implementa: IMessageTransport
Constructores
MatchingEngineAdapter()
Initializes a new instance.
Propiedades
OrderIdGenerator : IncrementalIdGenerator
Order ID generator.
PortfolioManager : IPortfolioManager
Portfolio manager for handling portfolio state.
Settings : MatchingEngineSettings
Matching engine settings.
StopOrderManager : IStopOrderManager
Stop order manager (read-only access).
TradeIdGenerator : IncrementalIdGenerator
Trade ID generator.
TransactionIdGenerator : IdGenerator
Transaction id generator for internal use (group cancel, close positions).
Métodos
CheckLimitOrders(SecurityId, decimal?, DateTime, List<Message>)
Re-evaluate resting limit orders against the current order book and execute the ones the market has moved through. Unlike stop orders, limit orders are otherwise matched only at registration time, so a tick/quote trading through a resting limit would leave it sitting in the book and later fill at a price the market has left behind.
CheckStopOrders(SecurityId, decimal, DateTime, List<Message>)
Check stop orders against a price and process triggered orders.
GetSecurityState(SecurityId) : SecurityState
Get or create security state for the given security.
ProcessMessage(Message, List<Message>)
Process a message and collect results. Can be called directly (without async dispatch).
ProcessOrderCancel(OrderCancelMessage, List<Message>)
Process order cancellation.
ProcessOrderRegister(OrderRegisterMessage, List<Message>)
Process order registration.
SendOutMessageAsync(Message, CancellationToken) : ValueTask
Send out message.
Eventos
NewOutMessageAsync : Func<Message, CancellationToken, ValueTask>
New message event.