How does a limit order book work and what determines which orders get filled first?
I understand that a limit order specifies a maximum buy price or minimum sell price, but I'm fuzzy on how the order book is organized and how price-time priority works in practice. Could someone walk through a concrete example of orders arriving and getting matched?
A limit order book (LOB) is the central mechanism in an order-driven market. It collects all outstanding buy and sell limit orders and matches them using price-time priority.
Price-Time Priority Rules:
- Price priority — the best-priced orders execute first. For buys, the highest bid gets priority. For sells, the lowest ask gets priority.
- Time priority — among orders at the same price, the order that arrived earliest fills first.
Walkthrough Example:
The book for Harlow Corp shows the best ask at $52.00 (300 shares) and the best bid at $51.95 (400 shares). The spread is $0.05.
Now suppose a new market buy order for 400 shares arrives:
- First, it fills against the 300 shares at $52.00 (cheapest ask)
- Still needs 100 more shares, so it moves up to the next level: $52.05, filling 100 of the 500 shares there
- Result: buyer pays a volume-weighted average of (300 x $52.00 + 100 x $52.05) / 400 = $52.0125
- The remaining 400 shares at $52.05 stay on the book
Key concepts for the exam:
| Term | Definition |
|---|---|
| Bid-ask spread | Difference between best bid and best ask |
| Market depth | Total quantity available at each price level |
| Price improvement | When an order fills at a better price than the standing quote |
| Aggressive order | Crosses the spread to execute immediately |
| Passive order | Sits on the book providing liquidity |
Hidden orders and icebergs: Some exchanges allow traders to hide part of their order size. Only the displayed portion has time priority — the hidden portion is treated as a new order when the displayed portion fills.
Understanding the limit order book is essential because many CFA Level I questions test whether you know which order fills first and at what price when multiple orders interact.
Check out our CFA equity course for video walkthroughs of order matching scenarios.
Master Level I with our CFA Course
107 lessons · 200+ hours· Expert instruction
Related Questions
What exactly is the Capital Market Expectations (CME) framework and why does it matter for asset allocation?
How do business cycle phases affect asset class return expectations?
Can someone explain the Grinold–Kroner model step by step with numbers?
How do you forecast fixed-income returns using the building-blocks approach?
PPP vs Interest Rate Parity for forecasting exchange rates — when do I use which?
Join the Discussion
Ask questions and get expert answers.