Level 2 · First stepsThe gold rush#134

Order books explained: the price is the front of the queue, the depth is what you pay

An order book is an exchange's list of everyone waiting to buy or sell, sorted by price and then by time. The price on the screen only covers the first few orders in the queue. A large order eats its way down the book, and the depth behind the front decides what it really costs.

Picture the trading post of a boomtown. On one wall, prospectors pin notes saying what they'll pay for an ounce of gold. On the other wall, notes saying what sellers want for it. The clerk matches the best note on each wall, and that's the price everyone repeats in the saloon.

Behind those two notes hang hundreds more, each one a little further from the middle. Nobody in the saloon talks about them. They start to matter the moment someone wants to sell a whole wagonload at once.

That wall of notes is the order book. The price on the screen is the front of the queue. The depth behind it decides what a large order really costs.

What it is

An order book is an exchange's live list of open orders for one trading pair, such as bitcoin against euros. Buy orders (bids) are sorted from the highest price down, sell orders (asks) from the lowest price up. Each line says a price and how much is waiting there.

The best bid and the best ask are the top of the book. The gap between them is the spread, covered in "The spread: the fee nobody shows you". How to place orders is in "Market order vs limit order". This article is about everything behind the top line.

How it works

Who goes first. Coinbase's documentation for its exchange says it plainly: "Orders are executed in price-time priority as received by the matching engine" (Coinbase). The best price is served first. At the same price, whoever arrived first is served first. A trade happens at the price of the order that was already waiting, not the price of the one that arrives.

Walking the book. Here is a small book in round numbers, made up to show the arithmetic, not a real snapshot. The asks:

  • 0.2 bitcoin at €57,000
  • 0.3 bitcoin at €57,050
  • 0.5 bitcoin at €57,200

A market order to buy 1 bitcoin takes all three lines. It pays €11,400 for the first 0.2, €17,115 for the next 0.3 and €28,600 for the last 0.5. Total: €57,115, or 0.2% more than the €57,000 on the screen. That difference is called slippage. On a deep book, it's pennies. On a thin one, it isn't.

A real one. On 21 June 2017 at 12:30pm Pacific time, someone placed "a multimillion dollar market sell" on the ETH-USD book of GDAX, the trading platform Coinbase ran at the time. According to the exchange's own update, the order filled at prices from $317.81 down to $224.48, "a book slippage of 29.4%". That fall triggered about 800 stop-loss orders and margin liquidations, which sold into an emptying book, and ether "temporarily" traded as low as $0.10 (GDAX, 22 June 2017).

The exchange found "no indication of wrongdoing", said its matching engine "operated as intended", and called the trades final. That's the uncomfortable part. Nothing broke. The book did exactly what a book does: it served the queue in order until the queue ran out of good prices.

What the sheriff added. In the EU, MiCA sets rules for firms that run a trading platform (EUR-Lex; readable version in ESMA's single rulebook, Article 76). The platform must "make public any bid and ask prices and the depth of trading interests at those prices". It must publish the price, volume and time of executed trades. Its systems must be "able to reject orders that exceed pre-determined volume and price thresholds or are clearly erroneous". The depth is public by law. Reading it is still your job.

Why it matters

The order book decides who pays for hurry. Someone who leaves a limit order waiting adds depth to the book and waits for a price. Someone who sends a market order takes depth away and accepts whatever the queue offers. Most exchanges charge the second group a higher fee as well; "How to read an exchange's fee table" shows by how much.

Depth is also the honest measure of liquidity. A big coin on a big exchange has a long queue at every price. A small coin can show a lively price with almost nothing behind it. The shovel seller earns a fee on both, deep or thin.

Where people get it wrong

  • "The price on the screen is the price I'll get." Only for the amount waiting at the top of the book. Beyond that, you walk down it.
  • "A market order is safe because it's quick." It's certain to fill, not certain to fill well. The GDAX seller in 2017 found out how far down quick can go.
  • "A big wall of orders is a promise." A waiting limit order can usually be cancelled until it's matched. A wall can disappear before you reach it.
  • "Bitcoin has one price." Every exchange has its own book. Same coin, different queue, different depth.
  • "A stop-loss sells at my price." In June 2017, stop orders on GDAX joined the cascade that took ether to ten cents. Check how your exchange's stop orders execute before you rely on one.

Look behind the front of the queue

Before any order that's large for the coin you're trading, open the depth view and add up the asks (or bids) until you reach your amount. If the last price you'd hit is far from the first, split the order or use a limit order and let the book come to you.

The saloon will always quote the front of the queue. Your wagonload sells at the back.

Frequently asked questions

What is an order book in crypto?

An order book is an exchange's live list of open buy and sell orders for one trading pair, sorted by price. Buy orders are called bids and sell orders are called asks. The best bid and best ask form the top of the book, and the gap between them is the spread.

How does an exchange decide which order fills first?

Most order-book exchanges use price-time priority. The best price is filled first, and among orders at the same price, the earliest one goes first. The trade happens at the price of the order that was already waiting in the book.

What is slippage?

Slippage is the difference between the price you see at the top of the book and the average price you actually pay. It happens when your order is larger than the amount waiting at the best price, so it fills at several worse prices. Thin order books produce more slippage.

What happened in the 2017 GDAX ether flash crash?

On 21 June 2017, a multimillion-dollar market sell order on GDAX filled from $317.81 down to $224.48. The drop set off about 800 stop-loss orders and margin liquidations, and ether briefly traded at $0.10. The exchange said its matching engine had worked as intended.

Does MiCA require exchanges to publish their order book?

Yes, for trading platforms authorised in the EU. MiCA Article 76 requires them to make public bid and ask prices and the depth of trading interest at those prices, and to publish the price, volume and time of executed trades.

Sources

  1. Coinbase Developer Platform, Exchange matching engine (read on 19 November 2026)
  2. Adam White (GDAX), ETH-USD Trading Update (22 June 2017)
  3. EUR-Lex, Regulation (EU) 2023/1114 on markets in crypto-assets (MiCA)
  4. ESMA, Interactive single rulebook, MiCA Article 76: operation of a trading platform for crypto-assets

Read next.