Core Idea
An order book is a real-time ledger of buy and sell interest for a financial asset. It is used by a matching engine to determine how trades are executed between buyers and sellers.
An order book contains:
- Buy orders (bids) → what buyers are willing to pay
- Sell orders (asks) → what sellers are willing to accept
A trade happens when:
a bid price matches or exceeds an ask price
Price Levels
Orders at the same price are grouped into a price level.
At a given price:
- multiple buy/sell orders can exist
- they are executed in priority order (usually time priority)
Top of the Book
The most important prices in the market:
- Highest bid (best buy price)
- Lowest ask (best sell price)
Meaning:
The spread measures liquidity and trading cost
Crossed Book
A book is crossed when:
- highest bid ≥ lowest ask
This implies:
trades can execute immediately (orders overlap in price)
Normally:
- this condition is temporary in efficient markets
Book Depth
Depth = how many price levels exist
- shallow book → low liquidity, higher volatility
- deep book → high liquidity, more stable pricing
Matching Engine
The system that processes orders:
- matches buyers and sellers
- prioritizes price first, then time
- determines trade execution
Market Interpretation
Order books reveal:
- supply and demand at different price levels
- liquidity concentration
- short-term price pressure
Key Insight
Price is not just a single number—it is the result of competing layered orders across a structured market.
One-line Summary
An order book is a dynamic list of buy and sell orders organized by price levels, where a matching engine executes trades based on price-time priority, revealing real-time market supply and demand.