Order Book
An order book is an exchange's live list of open buy orders (bids) and sell orders (asks) for a trading pair, sorted by price. It shows how much buyers and sellers are offering at each price level.
An order book records the limit orders waiting to be filled for a pair such as BTC/USDT. Bids are sorted from the highest price down and asks from the lowest price up, each with a price and a quantity. The gap between the best bid and the best ask is the bid-ask spread. A matching engine pairs compatible orders, usually giving priority to the best price and then to the earliest order at that price. Limit orders that cannot match right away rest in the book. Market orders execute immediately by consuming resting orders.
Most centralized exchanges and some decentralized exchanges use order books. Many DEXs instead use automated market makers, which price trades with a formula rather than matching individual orders. An order book also shows market depth: how much can be bought or sold near the current price before the price moves.
For example, suppose the asks show 2 tokens at 10.00 and 5 tokens at 10.05. A market buy for 4 tokens fills 2 at 10.00 and the other 2 at 10.05, so the average price ends up higher than the best ask. That difference is slippage, and it grows when the book is thin.
A common misconception is that visible orders are firm commitments. They can be cancelled at any moment. Large orders placed with no intention of filling them, known as spoofing, can create a false impression of strong buying or selling interest.