Hello,
I'm questioning the following matching behavior I observed in the mt_order_entry example liquibook application after placing the following three orders sequentially:
1) Place a #1 BUY 100 IBM MKT order.
2) Place a #2 BUY 100 IBM $2 order.
3) Place a #3 SELL 105 IBM MKT order
As expected, when the "sell 105 IBM@MKT" order (#3) is placed, it matches with the entire quantity of the "buy 100 IBM@$2" order (#2), and there are 5 leftover shares for the seller to sell.
Since a trade has occurred, and presumably a market price has been established ($2), I'm wondering why those leftover shares on the sell side did not match with 5 shares from the open "buy 100 IBM@MKT" order (#1)? I'd expect those 5 extra shares to match with 5 shares of order #1 at a $2 market price.
Instead, this is the result of the depth book after order 3 matched with order 2:
Order book for IBM:
Ask 5 @ Sell at Market
Bid 100 @ Buy at Market
Is my expectation wrong?
Thanks,
Mike Mancini