Order execution mechanics: from orders to actual fills · 2 / 6
Reconstruct a maker queue before assuming a fill
A trade at your limit price does not prove that your order filled. A resting order can stand behind other orders. Matching priority depends on the venue and product; FIFO is one possible algorithm, and pro-rata allocation is another. A chart's low or high touching the limit is weaker evidence than an execution report.
Athenum6 minUpdated:
FIFO queue position: orders ahead vs orders behind
Use a deliberately simplified price-time FIFO ledger to see the distinction. Assume all orders discussed are offers at 100 USDT; better-priced offers have already been consumed, no hidden quantity exists, and all events below are known in order. At the moment your eight-unit offer arrives, 30 units are ahead of it. Fourteen units arriving afterward are behind you and do not worsen your initial queue position under these assumptions.
Post-only orders and queue priority after modification
Post-only constrains how an order enters the book; it does not guarantee that it will fill, remain at the front, or earn money. An accepted maker order can be filled just before price moves against it. Modifying an order may reset its priority, depending on the modification and exchange rules. Any replay must apply the actual priority rules, not assume the original place in line survives.
Example: an 8-unit offer behind 30 units fills only 5
An aggressive buyer executes 18 units at 100. Your queue ahead falls to 12; you have no fill. Seven units known to be ahead then cancel, leaving five. A subsequent ten-unit aggressive buy executes the remaining five ahead and five of your units. You now have three units still resting. The market traded 28 units at your price, but only five of your units filled.
| Event | Quantity ahead afterward | Your cumulative fills | Your remaining order |
|---|---|---|---|
| Your eight-unit order arrives | 30 | 0 | 8 |
| 18 units execute | 12 | 0 | 8 |
| Seven known-ahead units cancel | 5 | 0 | 8 |
| Ten units execute | 0 | 5 | 3 |
Open full-size diagram- 30 units ahead when your order arrives
- 18 execute: 12 remain ahead, no own fill
- Seven known-ahead units cancel: five remain ahead
- Ten execute: five fill your order; three of your units remain
Mistake: inferring queue position from aggregated order book depth
The word “known” matters. With aggregated level-two depth, a seven-unit decrease could be a cancellation behind you, a cancellation ahead, an execution, or several updates netted together. It does not establish the same queue improvement as this complete hypothetical ledger. A public tape and snapshot usually support bounds or a model, not perfect reconstruction of your live priority. Use the exchange's own order/fill reports to establish your actual fills.
Before acting
- Name the matching algorithm and its assumptions.
- Separate quantity ahead from orders behind.
- Attribute cancellations only when order-level evidence permits it.
- Apply actual amendment and priority rules.
- Use order/fill reports to establish your own executed size.
Check your understanding
In the same FIFO ledger, the final aggressive buy is six units instead of ten. How much of your order fills and remains?
Show the explained answer
Five of the six units execute against orders ahead; one fills your order. Seven of your original eight units remain. Trading at your price does not allocate all that volume to your order.
Sources and further reading
Continue with Athenum
From the Athenum blog
Bitcoin Order Book Depth: One Exchange, Two Routes, 18 Times the Book
Related lessons
- Choose between stop-market and stop-limit orders
A stop's trigger is not its fill. Compare gaps, partial fills, reduce-only and exchange protection rules before relying on a stop-market or stop-limit exit.
- Distinguish absorption from exhaustion in order flow
A price that stops falling can mean buyers absorbing sellers or selling simply fading. Tell them apart with executed flow, replenishment and the price response.