519 / 736LOB

Order book

Order book: resting offers by price and quantity

An Order book shows the prices and quantities currently offered by buyers and sellers on a particular market. It helps explain the possible cost of a trade. But it is neither a receipt for completed trades nor a promise that those offers will still be there when you decide.

Petr opens a trading screen and sees two moving columns of numbers. On one side are bids, offers to buy; on the other are asks, offers to sell. Each row combines a price with a quantity. If Petr wants to buy now, he needs sellers already waiting. The book answers a practical question: who is offering the other side of my trade, and how much?

Petr notices an offer disappear from the book. That need not mean a sale: its owner may have canceled it. Coinbase therefore separates open-order data from actual trade messages. The book describes available offers; trade history records what has happened. Resting quantity is not traded volume. Both also belong to a particular platform and pair, not every bitcoin trade worldwide. [1] [2]

In ordinary continuous trading, the best bid is the highest buying offer and the best ask the lowest selling offer. Their difference is called the Bid–ask spread. An immediate purchase takes from the asks; an immediate sale takes from the bids. This can seem confusing at first: although Petr is buying, waiting sellers set the price available for his immediate purchase. The last trade price is a different figure. [3] [4]

Several sellers can offer the same price. The display may add their quantities into a price level: a shared row for that price. In its aggregated data, Coinbase reports total quantity and the number of orders separately. You do not multiply that total by the order count again. Nor does the row identify the people behind those offers or your own order’s precise place in the queue. [1]

Instead of buying immediately, Petr can place his own offer and wait. Coinbase Exchange gives priority to price, then arrival time among orders with the same price. Older offers may therefore go first. A small incoming sale may never reach Petr even though trades occur at his price. This is a rule of that platform; other mechanisms or auctions may allocate fills differently. [5]

Only a small part of Petr’s desired quantity may be available at the cheapest asking price. If the order allows it, the next portion buys at a higher price. The average therefore depends on the quantity actually bought at each level. A price limit can prevent buying more expensively, but cannot guarantee the remaining quantity gets bought. Fees also matter to the total cost; the first row is not enough. [4]

A conspicuously large offer is sometimes called a wall. Petr might conclude that the price cannot pass it. Yet the offer can be canceled or gradually traded. CFA also discusses spoofing: misleading order placement without a genuine intention to execute. Neither an offer’s size nor its disappearance proves that intent by itself. A book snapshot cannot establish a certain price forecast or justify accusing a particular trader. [2] [3]

The display starts from a snapshot and subsequent updates in the order required by the data channel. In Coinbase level2, a new size is the total quantity at that price, not an amount to add. Zero size means removing the level. Misreading these rules can make an app show offers that do not exist. Smooth animation is therefore not evidence that the data are correct and current. [2]

Sometimes a platform collects orders for an auction instead of matching them continuously. Coinbase explains that no trades occur during this collection phase, and buying prices can appear to exceed selling prices. Auction quotes are indicative and can change. Petr cannot infer an immediate guaranteed profit from such a table. First he needs to know the market, the age of the data and whether normal trading, an auction or restricted operation is underway. [1]

Two sides of one fictional book

Two ask and two bid levels. Best ask is 100100 USD/BTC and best bid 100000 USD/BTC; the difference is 100 USD/BTC. Quantities are in BTC and are not current offers.

SidePrice · USD/BTCQuantity · BTC
Sell offers · asks1002000.02
1001000.01
Bid–ask spread · USD/BTC100
Buy offers · bids1000000.015
999000.03
Illustration of a continuous book without other events. Immediate buying consumes asks from the lowest price; immediate selling consumes bids from the highest. Displayed quantities can change or cancel.
Example · LOB

A purchase that moves to the next row

In a fictional book, 0.01 BTC is offered at 100100 USD/BTC and 0.02 BTC at 100200 USD/BTC. Petr buys 0.02 BTC: the entire first offer and 0.01 BTC from the second. He pays 1001 + 1002 = 2003 USD, averaging 100150 USD/BTC. The second level retains 0.01 BTC. This calculation excludes fees and assumes the offers are available with no other book changes. It is a teaching model, not current prices or a guarantee that an order will fill.

For the clearest picture, read this entry together with Market depth, Bid–ask spread, Market order, Limit order, Market microstructure, Depth chart. The reverse links also lead from Slippage, Market order, Limit order, Market structure.

01Does a large row mean one large trader?

No. The displayed total can combine orders from many participants. Even an individual order does not reveal its ultimate owner or their other positions. Size describes an offer, not a reliably identified person.

02Can I tell what I will pay from a picture of the book?

You can make a conditional calculation: what the purchase would cost if offers stayed unchanged and the order were allowed to take them. Before it arrives, however, offers may be withdrawn or taken. Actual fills and fees determine the bill, not an old picture.

DOC · 001Coinbase Exchange — Product BookDocumentation DOC · 002Coinbase Exchange — WebSocket ChannelsDocumentation DOC · 003CFA Institute — Trading CostsDocumentation DOC · 004Coinbase Exchange — TradingDocumentation DOC · 005Coinbase Exchange — Matching EngineDocumentation
Revised: Source-first · No investment advice