Per #1730 the OrderMatchingEngine is not correctly handling limit order fills when a data point moves past the order price and there is more than one level on that side of the book.
Expected Behavior
Resting limit orders should fill at their limit price, especially when post_only.
Actual Behavior
Only the top level of the book will "honor" the orders limit price, subsequent levels may move "through" the orders limit price.
Steps to Reproduce the Problem
Setup an OrderBook with a book_type of L2_MBP and market-by-price order book data (multi-level)
Setup a resting limit order
Process the book with updates which move partial fills through the limit price
Bug Report
Per #1730 the
OrderMatchingEngine
is not correctly handling limit order fills when a data point moves past the order price and there is more than one level on that side of the book.Expected Behavior
Resting limit orders should fill at their limit price, especially when
post_only
.Actual Behavior
Only the top level of the book will "honor" the orders limit price, subsequent levels may move "through" the orders limit price.
Steps to Reproduce the Problem
OrderBook
with abook_type
ofL2_MBP
and market-by-price order book data (multi-level)Specifications
nautilus_trader
version: 1.196.0 (develop)