Skip to content

What Is an Order Book? How Buyers and Sellers Meet

Every trade happens because a buyer and seller agree on a price. The order book is the live record of all the prices people are willing to trade at. Understanding it reveals how markets actually work.

28 of 31 ~4 min

Before any stock trade happens, someone must be willing to sell at a price someone else is willing to buy. The order book is the live record of every buy order and sell order sitting in the market, waiting to be matched.

Buy Orders and Sell Orders

Buy order (bid): “I’m willing to buy up to X shares at price Y or lower.”

Sell order (ask): “I’m willing to sell up to X shares at price Y or higher.”

When a buyer’s bid price meets or exceeds a seller’s ask price, a trade happens.

Reading an Order Book

Here’s a simplified order book:

ASK (Sellers)                  |  BID (Buyers)
Price    | Shares | Orders   | Orders | Shares | Price
----------|-------|---------|--------|-------|----------
$100.01  |  100  |   2    |   10    | 2000   | $100.00  ← spread $0.01, midprice $100.005
$100.02  |  200  |   1    |    3    |  600   |  $99.99
$100.03  | 3000  |   8    |    1    |  300   |  $99.98
$100.04  | 1200  |   5    |    4    | 1500   |  $99.97
$100.05  |  500  |   3    |    2    |  800   |  $99.96

Best bid ($100.00): The highest price any buyer is willing to pay right now. Best ask ($100.01): The lowest price any seller is willing to accept right now. Bid-ask spread: $100.01 - $100.00 = $0.01 (1 cent). Midprice: ($100.00 + $100.01) / 2 = $100.005. The middle of the market.

Market Orders vs. Limit Orders

Market order: “Buy/sell right now at the best available price.” A market order submits immediately and is filled whenever liquidity is available at or better than the current top of book, but execution is not strictly guaranteed in every condition: it may receive only a partial fill if available size at the touch is smaller than your order; it can be rejected during exchange-imposed trading halts or circuit-breaker pauses; some venues enforce price collars or banded-price limits that prevent fills outside an allowed range; and with insufficient liquidity (extremely wide book or no counterparties) the order may be rejected entirely. In those cases brokers typically return an execution report rather than silently dropping the order.

Limit order: “Buy only at $X or lower / Sell only at $Y or higher.” You control the price, but your order may never execute if the market doesn’t reach your price.

Example: Stock is currently at $100.00 bid / $100.01 ask.

  • If you place a market buy order: You’ll buy at $100.01 (the ask). You pay $100.01.
  • If you place a limit buy order at $100.00: You’ll only buy if the price falls to $100.00 or below. You wait. If the price never falls, you don’t buy.

The Bid-Ask Spread

The difference between the best bid and best ask is the bid-ask spread:

Spread=Asklowest−BidhighestSpread = Ask_{lowest} - Bid_{highest}

The spread is the cost of trading immediately. If you buy at the ask and immediately sell at the bid, you lose the spread. This is why market orders are costly, you’re paying to trade right now.

Typical spreads:

  • Very liquid stocks (Apple, Microsoft): 1-5 cents
  • Less liquid stocks: 10 cents to several dollars
  • Small/illiquid stocks: Can be 5%+ of price

Queue Priority: Who Gets Filled First?

When multiple orders are at the same price, the exchange follows rules:

1. Price priority: A buy order at $100.02 gets filled before one at $100.01. Higher prices get priority.

2. Time priority (FIFO): Among orders at the same price, the earliest order gets filled first.

If you’re 500th in line to buy at $100.00 and 400 shares trade, you might not get filled.

Market Depth

The order book shows depth: how much size is available at each price level:

  • Level 1: Only the best bid and ask (shown above)
  • Level 2: Multiple price levels on both sides (shown above)
  • Level 3+: Full order book with all levels

More depth at a price level means more support (for bids) or resistance (for asks). Large orders sitting at a price act as “walls.”

Why the Order Book Matters

1. Liquidity: A thick order book (many orders at many levels) means easy trading. A thin book means you might not be able to trade at reasonable prices.

2. Price discovery: The order book reveals where buyers and sellers collectively think fair value lies. The spread and depth at each level show conviction.

3. Transaction costs: Wide spreads mean high implicit trading costs. Always check the spread before trading.

4. Market impact: Large orders “walk through” the book, buying a huge size consumes multiple price levels, moving the price against you.

Dark Pools: Hidden Liquidity

The public order book isn’t the whole story. Dark pools are private trading venues where large orders execute without showing up in the public book.

Why they exist:

  • Large orders can execute without moving the price
  • Institutional investors hide their size from other participants

Tradeoff: Better price but no certainty of execution.

Key Takeaways

  • The order book is a live record of all resting buy and sell orders
  • Best bid = highest buyer; best ask = lowest seller
  • Bid-ask spread = cost of trading immediately
  • Limit orders control price but may not execute; market orders guarantee execution but give up price control
  • Time priority (FIFO) at each price level
  • Dark pools provide hidden liquidity for large orders

References

  • Harris, Trading and Exchanges, Ch. 1-2. Oxford University Press, 2003. ISBN: 978-0-19-514470-3.
  • Hasbrouck, Empirical Market Microstructure. Oxford University Press, 2007. ISBN: 978-0-19-530164-9.