How an Order Book Works

An order book is the list of resting buy and sell orders for an instrument, sorted by price. It is the central data structure of electronic markets, and reading one fluently is a basic trading skill.

Bids are buy orders, sorted highest first. Asks (or offers) are sell orders, sorted lowest first. The gap between the best of each is the spread:

Spread=AsklowestBidhighest\text{Spread} = \text{Ask}_{\text{lowest}} - \text{Bid}_{\text{highest}}

A book, and what an order does to it

Bid size Bid Ask Ask size
500 99.98 100.02 300
1,200 99.97 100.03 800
2,000 99.96 100.04 1,500

The market is 99.98 bid at 100.02, a four-cent spread, with the mid at 100.00.

Now a trader sends a market order to buy 1,000. It takes the 300 at 100.02, then 700 of the 800 at 100.03. Average fill price:

300×100.02+700×100.031000=100.027\frac{300 \times 100.02 + 700 \times 100.03}{1000} = 100.027

Two things happened. The buyer paid more than the touch price, which is slippage from consuming depth. And the book is left with a new best ask at 100.03, so the mid has moved up: the trade itself pushed the price. That is market impact, and it is why large orders are worked over time rather than sent at once. See execution algorithms.

Walk the order book

Market order
Bid sizeBidAskAsk size
50099.98100.02300
120099.97100.03800
200099.96100.041500

The order is larger than the 300 showing at the touch, so it walks into the next level and the average fill is 100.027 rather than 100.02.

The order fits inside the size showing at the touch, so it fills at one price and the book is otherwise untouched.

The order is larger than the 1500 showing at the touch, so it walks into the next level and the average fill is 100.027 rather than 100.02. 400 goes unfilled: the book runs out.

1000
Average fill
100.027
Slippage vs touch
0.007
Mid after
100.005

The defaults are the lesson's book: buying 1,000 averages 100.027, not the 100.02 on the screen.

Drag the size up and the average fill drifts steadily away from the touch. There is no threshold where impact begins, which is the practical version of the callout below: size and price are not separate questions.

Key takeaway

The quoted price applies only to the quantity displayed at it. Anything larger walks the book, and the average fill is worse than the touch. Size and price are inseparable.

Limit versus market orders

A limit order specifies a worst acceptable price. It may rest in the book unfilled, and while resting it provides liquidity to others.

A market order takes whatever is available. It fills immediately and pays the spread.

That is the fundamental trade: certainty of execution against price. A limit order might get a better price or might never fill; a market order always fills but pays for the privilege. Market makers are on the limit side almost always, since the spread is their revenue rather than their cost.

Reading a book

Beyond the touch, the shape carries information.

Imbalance. Far more size bid than offered suggests buying pressure, and is a genuine short-term predictive signal used by many strategies.

Depth. A thick book absorbs size without moving; a thin one gaps. The same instrument can be either at different times of day.

Stability. Orders that appear and vanish rapidly are less meaningful than orders that rest. Much displayed size is cancelled before it trades, so treating displayed depth as real liquidity overstates what you can actually execute against.

Tip

Displayed size is an upper bound on available liquidity, not a promise. In fast markets much of it disappears in the moments before you can reach it.

Why it matters for pricing

The book is the market's current aggregate opinion, and the mid is the crudest summary of it. A market maker's estimate of fair value usually starts from the mid and adjusts for imbalance, recent trades and related instruments. Getting from the raw book to a fair value estimate is the core intellectual work of market making.

Test your knowledge

The offer side of a book shows 400 at 50.02, then 600 at 50.03, then 1,000 at 50.04. A trader sends a market order to buy 800. What is the average fill price? Round your answer to three decimal places.
What is the fundamental trade between a limit order and a market order, and which side is a market maker almost always on?