IOrderMatcher

StockSharp.MatchingEngine

Interface for order matching logic.

Methods

GetMarketPrice(Sides, IOrderBook) : decimal?

Get the best execution price for a market order.

side
Side of the market order (buy/sell).
book
Order book to query.

Returns: Best available price for the market order, or null if book is empty.

Match(EmulatorOrder, IOrderBook, MatchingSettings) : MatchResult

Try to match an order against the order book.

order
Order to match.
book
Order book to match against.
settings
Matching settings.

Returns: Match result.

WouldCross(EmulatorOrder, IOrderBook) : bool

Check if order would cross the book (for post-only validation).

order
Order to check.
book
Order book to check against.

Returns: True if the order would cross the book, otherwise false.