How an exchange order book works
Every exchange price comes from a list of waiting buy and sell orders. How deep that list is decides what you actually pay.
| Price | Amount | Side |
|---|---|---|
| 100.40 | 3.1 | Ask |
| 100.30 | 1.9 | Ask |
| 100.20 | 2.5 | Ask |
| 100.10 | 0.8 | Ask |
| 100.05 | 1.2 | Ask |
| Spread 0.10 · best ask 100.05 · best bid 99.95 | ||
| 99.95 | 1.5 | Bid |
| 99.90 | 2.2 | Bid |
| 99.80 | 0.9 | Bid |
| 99.70 | 3.4 | Bid |
| 99.60 | 2.0 | Bid |
Illustrative chart — not live market data
The order book
On an exchange, the price you see comes from an order book: a live list of orders waiting to be filled.
- Bids are buy orders: “I will buy this amount at this price.”
- Asks (or offers) are sell orders: “I will sell this amount at this price.”
The best bid is the highest price anyone is currently willing to pay. The best ask is the lowest price anyone is currently willing to sell for. The gap between them is the spread. In the example above, the best bid is 99.95, the best ask is 100.05, and the spread is 0.10.
A trade happens when a buyer and a seller meet on price. The “last price” on a chart is simply the most recent trade.
Market orders and limit orders
A market order says “fill this now, at whatever price is available.” It takes orders from the book, starting with the best one.
A limit order says “fill this only at my price or better.” If nothing matches it, it waits in the book and becomes part of the bids or asks.
Exchanges often charge less for orders that wait in the book (makers, who add liquidity) than for orders that fill immediately (takers, who remove it).
Slippage: a worked example
Using the book above, suppose a market order buys 3 coins:
| Filled at | Amount | Cost |
|---|---|---|
| 100.05 | 1.2 | 120.06 |
| 100.10 | 0.8 | 80.08 |
| 100.20 | 1.0 | 100.20 |
| Total | 3.0 | 300.34 |
The average price is about 100.11, not the 100.05 shown as the best ask. That difference is slippage. The larger the order compared with what is waiting near the price, the bigger it gets.
Liquidity
A liquid market has many orders close to the current price: a narrow spread and a deep book, so large orders barely move it. An illiquid market has few: a wide spread, and even modest orders move the price a long way.
This matters for chart reading too. In thin markets, a few orders can push price through a level and back again, which is one reason fakeouts are more common there.
Common mistakes
- Using market orders in thin markets. The price you pay can be far from the price shown.
- Looking only at the last price. Check the spread and how much is available near it.
- Assuming a limit order will fill. It guarantees the price, not the fill.
Education only. Examples are illustrative, and nothing here is a recommendation to buy, sell or hold any coin, token or stablecoin.
Check yourself