A
AcadiFi
QD
QuantFinance_Dev2026-04-09
cfaLevel IEquity InvestmentsMarket Organization

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?

112 upvotes
Verified ExpertVerified Expert
AcadiFi Certified Professional

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.

Loading diagram...

Price-Time Priority Rules:

  1. Price priority — the best-priced orders execute first. For buys, the highest bid gets priority. For sells, the lowest ask gets priority.
  2. 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:

TermDefinition
Bid-ask spreadDifference between best bid and best ask
Market depthTotal quantity available at each price level
Price improvementWhen an order fills at a better price than the standing quote
Aggressive orderCrosses the spread to execute immediately
Passive orderSits 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

#limit-order-book#price-priority#time-priority#bid-ask-spread#market-microstructure