An order book is the real-time list of outstanding buy and sell orders for a security at a trading venue, organised by price level and by the time each order arrived.
How an order book works
Most exchanges that trade shares, exchange-traded funds, futures and many cryptoassets run a central limit order book. Two sides make up the book:
- Bids: orders to buy, listed from the highest price down.
- Asks (offers): orders to sell, listed from the lowest price up.
The top of the book is the best bid and best ask. The difference between them is the bid-ask spread. When a new order arrives, the matching engine checks whether it can trade against the opposite side.
Resting orders and marketable orders
A limit order that cannot trade immediately (for example, a buy below the best ask) joins the book and waits. It is called a resting order, and it adds liquidity. A marketable order (a market order, or a limit order priced at or through the opposite best price) trades straight away against resting orders, which removes liquidity.
Price-time priority
Most venues use price-time priority:
- Price: the highest bid and the lowest ask get matched first.
- Time: among orders at the same price, the one that arrived earlier is filled first.
Some venues use variations, such as pro-rata allocation in certain futures markets, so the matching rules of each venue are worth checking.
A simple hypothetical book
Imagine a share trading at around 100 in a neutral currency. The book shows:
| Side | Price | Quantity |
|---|---|---|
| Ask | 100.30 | 400 |
| Ask | 100.20 | 300 |
| Ask | 100.10 | 200 |
| Bid | 100.00 | 500 |
| Bid | 99.90 | 600 |
| Bid | 99.80 | 800 |
The best bid is 100.00, the best ask is 100.10, and the spread is 0.10.
Scenario 1: a market buy for 150 shares. It matches the best ask of 100.10 and fills fully at 100.10, because 200 shares are available.
Scenario 2: a market buy for 600 shares. It consumes the book upward:
- 200 shares at 100.10 = 20,020
- 300 shares at 100.20 = 30,060
- 100 shares at 100.30 = 10,030
The total is 60,110, an average price of about 100.18. That is worse than the displayed best ask of 100.10. The difference is a form of slippage, and it is a direct result of the depth available.
Scenario 3: a limit buy for 100 shares at 100.00. It does not trade immediately because the best ask is higher. It joins the queue behind any earlier orders at 100.00. If 500 shares were already waiting there, the new order fills only after those 500 have traded or been cancelled, and only if sellers come down to that price.
Why it matters to investors
- Transaction costs: the spread and the depth near the top of the book indicate the real cost of getting in or out, especially for larger orders.
- Choice of order type: seeing a thin book may favour a limit order over a market order to control the execution price, at the risk of not being filled.
- Liquidity awareness: securities with deep books at many price levels tend to be easier to trade. Thin books, common in small or rarely traded securities, can produce sharp price moves on modest orders.
- Context for price moves: a price does not move because of an abstract force. It moves when orders consume one level of the book and the next level is further away.
What to watch out for
- The book is a snapshot. Orders can be cancelled or changed in milliseconds, so a large visible order may not be there when you trade.
- Not all liquidity is visible. Some venues allow hidden or iceberg orders, and some trading happens off the main book.
- Depth shown is not a guarantee. Fast markets, news and trading halts can empty one side of the book quickly.
- Retail displays vary. Many apps show only the best bid and ask, or a limited number of levels. Fuller depth data may require a separate data subscription.
- Auctions work differently. Opening and closing auctions collect orders and set a single price, rather than matching continuously.
Related concepts
The order book is closely tied to the bid price, ask price and bid-ask spread, which describe its top levels. Market depth describes how much quantity sits at each level. Limit and market orders determine whether you add to the book or take from it, and market makers often post both bids and asks to keep it populated.
This entry is for education and is not a recommendation to trade any security. All numbers above are hypothetical.