How an order book works
See bids, asks and the spread in action, and what happens when a market order meets a limit order.
Chapters
Transcript
Two queues of orders. An order book is two lists. One holds buy orders (bids), sorted from the highest price down. The other holds sell orders (asks), sorted from the lowest price up.
The best bid and best ask. The top of each list is the best price available on that side right now. The gap between them is the spread.
A market order arrives. A market order to buy takes the lowest ask. If it’s bigger than the quantity available at that price, it moves on to the next ask and the next. That’s how large orders move prices.
Depth and liquidity. A “deep” book has a lot of quantity near the best prices, so even big orders barely move the price. A thin book can jump with a single trade.
Recap. Bids and asks queue up. Market orders take liquidity and limit orders provide it. Depth determines how much prices move.