IOrderMatcher
StockSharp.MatchingEngine
Interface for order matching logic.
Methods
GetMarketPrice
public decimal? GetMarketPrice(Sides side, IOrderBook book)
result = iOrderMatcher.GetMarketPrice(side, book)
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
public MatchResult Match(EmulatorOrder order, IOrderBook book, MatchingSettings settings)
result = iOrderMatcher.Match(order, book, settings)
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
public bool WouldCross(EmulatorOrder order, IOrderBook book)
result = iOrderMatcher.WouldCross(order, book)
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.