Suppose the book of ticker X is empty. Simultaneously trader A sends a limit buy order for 1 unit of X at price 2$ and trader B sends limit sell order of 1 unit of X for 1$, what will happen? What is going to be the fill price? Same question for market order, suppose the book for ticker X is empty and traders A and B send a buy and sell market orders (without prices) is the fill price going to be the last fill price? how is the fill price determined in such case?


2 Answers 2


In the first case it is a "race condition": whichever order is received first (even if it is only one microsecond before the other) will populate the Book and the second limit order will execute against it, at the price of the first order.

In the second case it is indeterminate and may depend on the details of how the "matching engine" works. Probably when the first market order is received against an empty Book, it will be rejected and so will the second since the Book is still empty.

Both of these are "edge conditions" or peculiar cases where the result may be highly implementation dependent.

  • $\begingroup$ I would add that at the CME the depletion of the limit order book during trading hours would be considered highly unusual and probably triggers a market halt, with the market re-opening only if and when the limit order book fills again. In this "pre-market" state arriving market orders are held back in a queue awaiting market re-open. $\endgroup$
    – nbbo2
    Commented Dec 12, 2016 at 18:07
  • $\begingroup$ Although there is another answer which says differently, your answer makes more sense to me. $\endgroup$
    – e271p314
    Commented Dec 13, 2016 at 14:43
  • $\begingroup$ @noob2 the order book is very frequently empty in one side on some underlyings, it does not cause a halt. A market buy order however with no offers i believe will trigger a halt. $\endgroup$
    – will
    Commented Jan 9, 2021 at 14:00

While the behavior is generally exchange-dependent, in the first case, the orders are likely to get crossed at $1.50, and in the second, both return unfilled.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.