Order Book Explained: How Order Types Work

5.1 The Order Book, Mechanically

In Plain Words

An order book is a list of every waiting order. Buy orders, called bids, are listed by price, and sell orders, called asks, are listed too. The best bid and the best ask define the quoted spread and the midpoint between them. If your order is bigger than the shares shown at the best price, it walks the book: it fills at the best price and then at worse prices, paying more at each level.

Why it matters: A large order moves the price against you as it fills.

In Brief

Summary: An order book lists every resting buy order (bids) and sell order (asks) by price. The best bid and best ask define the quoted spread and the midpoint, and an order bigger than the shares shown at the best price walks the book, paying more at each level.

  • The midpoint is the average of best bid and best ask; the quoted spread is usually stated in basis points of the midpoint.
  • Depth is the number of shares at each price, and displayed depth understates true supply because of hidden orders.
  • In the worked example, a 3,000-share market buy averaged $50.0297 and cost about $59 (3.9 bps) against a $50.01 midpoint.
  • The same order in a thin book cost about $1,086 (72 bps): check depth before sending a market order.
  • The spread exists mainly because resting orders can be picked off by better-informed traders (Section 5.3: Market Makers and the Bid-Ask Spread).

About 3 minutes to read. Figures and rules in this chapter last reviewed October 4, 2026.

Four cards: the book lists every resting bid and ask by price; the best bid and best ask define the quoted spread and the midpoint; an order larger than the shares at the best price walks the book; displayed depth understates true supply because of hidden orders
Figure 5.1.1 · Anatomy of an order book

Every modern electronic exchange operates around a central limit order book — a continuously updated, real-time list of every outstanding buy order (the bid side) and sell order (the ask or offer side) for a given security, ranked by price. The highest price any buyer is currently willing to pay is the best bid; the lowest price any seller is currently willing to accept is the best ask; the gap between the two is the bid-ask spread introduced conceptually in Capital Markets Part 3. A trade executes automatically the instant a new order’s price crosses and matches an existing order already resting in the book.

Three more numbers describe a book. The midpoint (or midquote) is the average of the best bid and best ask, the market’s best single estimate of value. The quoted spread is best ask minus best bid, usually quoted in basis points of the midpoint so that a $5 stock and a $500 stock can be compared. Market depth is the number of shares resting at each price level. An order that crosses the spread and trades at once is marketable and takes liquidity; an order that rests in the book waiting to be hit makes liquidity. When a marketable order is larger than the shares displayed at the best price, it consumes that level and moves on to the next, which is called walking the book.

Why does the gap between bid and ask exist at all, when anyone could post a better price? The short answer, developed in Section 5.3: Market Makers and the Bid-Ask Spread, is adverse selection: whoever posts a resting order is offering a free option to every trader who might know more, and the spread is the price of that option.

🧮 Worked Example — Reading a Book and Walking It

A $50 stock shows the book below. Everything that follows uses only these numbers.

Bid sizeBidAskAsk size
1,200$50.00$50.02800
2,500$49.99$50.031,500
4,000$49.98$50.043,000

Midpoint = (50.00 + 50.02) ÷ 2 = $50.01. Quoted spread = 50.02 − 50.00 = $0.02, or 0.02 ÷ 50.01 × 10,000 ≈ 4.0 bps.

A market order to buy 3,000 shares walks three levels: 800 × $50.02 + 1,500 × $50.03 + 700 × $50.04 = $150,089. Average price = 150,089 ÷ 3,000 = $50.0297.

Cost against the midpoint = (50.0297 − 50.01) × 3,000 ≈ $59, or about 3.9 bps. Of that, $29 comes from going past the best ask: (50.0297 − 50.02) × 3,000. Section 5.5: Algorithmic Execution Strategies repeats this arithmetic at institutional size.

Decision Rule

Compare your order with the shares displayed at the best price. If it is no larger than that size and the quoted spread is under about 10 bps, a market order costs roughly half the spread. If it is larger, or the spread is 10 bps or wider, use a limit order or split the order; above about 25 bps, use limit orders only. These are heuristics for liquid US stocks in regular hours; they do not apply in the opening and closing auctions (Section 5.4: Price-Time Priority and Matching Engines).

The Costliest Mistake

Sending a large market order into a thin book. Had the book above held only the 800 shares at $50.02 with the next offer at $50.50, the same 3,000-share order would have paid 800 × 50.02 + 2,200 × 50.50 = $151,116, about $1,086 (72 bps) against the midpoint instead of $59. Thin books are common in small caps, just after the open and around news. Look at depth, and cap the price with a limit.

Frequently Asked Questions

What is the bid-ask spread in simple terms?

It is the gap between the highest price a buyer offers and the lowest price a seller asks. If a stock is quoted $50.00 bid and $50.02 ask, the spread is two cents, and anyone who buys and immediately sells loses about that much per share.

What does “depth” mean in an order book?

Depth is the number of shares available at each price. A book with 800 shares at the best ask is deep enough for a small order but will move for a large one. Displayed depth understates true supply, because iceberg and hidden orders (Section 5.2: Order Types) are not fully shown.

Can I see the full order book as a retail investor?

Usually you see only the best bid and ask. Many brokers offer deeper “Level 2” data showing several price levels, sometimes for a fee, but even that misses hidden orders and trades that happen off exchange (Section 5.7: Dark Pools and Fragmented Liquidity).

✓ Section Recap

The order book ranks resting bids and asks by price; the midpoint, quoted spread and depth describe it, and an order larger than the displayed size walks the book. In the worked example, a 3,000-share market buy cost about $59 against the midpoint in a normal book and about $1,086 in a thin one, so check depth and use limits for size.

✎ Check Yourself

Six questions on this chapter. Decide on your answer first, then click “Reveal Answer.”

1. A book shows a best bid of $40.00 and a best ask of $40.04. What is the quoted spread in basis points of the midpoint, to one decimal place?

  1. About 10.0 bps
  2. About 4.0 bps
  3. About 1.0 bps
  4. About 20.0 bps
Reveal Answer

Answer: A. Midpoint = (40.00 + 40.04) ÷ 2 = 40.02; spread = 0.04 ÷ 40.02 × 10,000 ≈ 10.0 bps.

2. Asks rest at $20.01 for 500 shares and $20.02 for 1,000 shares. What is the average price of a 1,000-share market buy?

  1. $20.020
  2. $20.010
  3. $20.015
  4. $20.012
Reveal Answer

Answer: C. 500 × 20.01 + 500 × 20.02 = 20,015; 20,015 ÷ 1,000 = $20.015.

3. What does market depth describe in an order book?

  1. The number of venues quoting the same stock
  2. The number of shares resting at each price level
  3. The average price of the last hundred trades
  4. The gap between the best bid and the best ask
Reveal Answer

Answer: B. Depth is the quantity available at each price; the gap between best bid and ask is the spread.

4. Why does an order larger than the displayed size at the best ask usually cost more per share than the best ask?

  1. Exchanges charge a surcharge on orders above a size limit
  2. Market makers must cancel quotes before large orders arrive
  3. Large orders are routed to auctions at the closing price
  4. It fills the best level and then trades at higher prices
Reveal Answer

Answer: D. Once the shares at the best ask are used up, the order walks the book to the next, higher levels.

5. Worked problem: The best bid is $49.98 and the best ask $50.02. What are the midpoint and the quoted spread in basis points?

Reveal Answer

Answer: Midpoint = $50.00. Spread = $0.04 ÷ $50.00 = 8 bps.

6. Worked problem: There are 300 shares offered at $50.02 and 600 at $50.03. What average price does a market order to buy 700 shares pay?

Reveal Answer

Answer: 300 at $50.02 and 400 at $50.03: average = $50.0257, above the best ask because the order walks the book.

5.2 Order Types

In Plain Words

Every type of order trades certainty of getting done against certainty of price. Market orders and stop orders will execute, but might fill far from the price you expected. Limit orders and stop-limit orders cap the price you will accept, but might not fill at all. It is like choosing between catching a train at any fare and waiting for a cheaper ticket that might sell out.

Why it matters: You can be sure of the price or sure of the trade, but not both.

In Brief

Summary: Every order type trades certainty of execution against certainty of price. Market and stop orders execute but can fill far from the expected price; limit and stop-limit orders cap the price but may not fill at all.

  • A stop becomes a market order when its trigger trades, so it guarantees a trigger, not a price.
  • Stop-limit, IOC/FOK, on-close and midpoint-peg orders each answer a specific need, at a specific cost.
  • Clustered stops can turn a dip into a cascade, because each triggered stop is a new market sell order.
  • In the worked example, a $95 stop on a stock that gapped to $82 lost $18,100 instead of the planned $5,000.
  • No order type removes gap risk; only position size, or an option hedge such as a protective put, limits it.

About 5 minutes to read. Figures and rules in this chapter last reviewed October 4, 2026.

Two lists: market and stop orders execute but can fill far from the expected price, and a stop becomes a market order when triggered; limit and stop-limit orders cap the price but may not fill at all
Figure 5.2.1 · Certainty of execution or of price

Traders choose from several standard order types, each making a different trade-off between certainty of execution and certainty of price.

Order TypeHow It WorksTrade-Off
Market OrderExecute immediately at the best currently available priceGuarantees execution, but not price — particularly risky in a fast-moving or illiquid market
Limit OrderExecute only at a specified price or betterGuarantees price, but not execution — the order may never fill if the market never reaches that level
Stop OrderBecomes a market order once a specified trigger price is reached — commonly used to limit losses on an existing positionGuarantees a trigger, but the actual execution price can still differ from the trigger price in a fast-moving market
Iceberg OrderDisplays only a small portion of a much larger total order to the rest of the market, refreshing as each visible slice fillsReduces the market-impact signal a very large order would otherwise send, at the cost of somewhat slower total execution
Stop-Limit OrderOnce the trigger price trades, becomes a limit order at a chosen limit price rather than a market orderCaps the execution price, but may not fill at all if the price gaps through the limit
Immediate-or-Cancel (IOC) / Fill-or-Kill (FOK)IOC fills whatever it can at once and cancels the rest; FOK fills the whole quantity at once or nothingNever rests in the book, so it reveals little, but it may fill partly (IOC) or not at all (FOK)
Market-on-Close / Limit-on-CloseExecutes in the closing auction at the single official closing price (Section 5.4: Price-Time Priority and Matching Engines)Matches the benchmark many funds are measured against; a market-on-close accepts whatever the auction price is, while a limit-on-close caps the price but may not fill
Midpoint PegRests at the midpoint of the best bid and ask and moves with it, usually hiddenSaves half the spread when it fills, but fills only when someone else is willing to meet at the middle
Under the Hood: Why Stop Orders Can Turn a Dip into a Drop

A stop order is a resting instruction that becomes a market order only when its trigger trades. Many holders place stops at similar levels, just under round numbers or recent lows, so triggers cluster. When the price reaches the cluster, a block of new market sell orders arrives at once, hits a book whose bids were sized for normal flow, and walks it down; the lower prices trigger the next group of stops. The order type each investor chose to limit risk becomes, in aggregate, a source of it. Stops also do nothing while the market is closed, so after an overnight gap the first trade triggers the stop far below its level: a stop guarantees a trigger, not a price.

Edge Cases: When the Standard Answer Changes

The rule “market orders buy certainty of execution, limit orders buy certainty of price” holds in a continuous, open market. These situations change it.

SituationWhat changesWhy
Overnight gap through a stopStop fills far below the triggerThe trigger price never trades; the first trade after the gap converts the stop into a market order
Single-stock trading pauseOrders sit unexecuted, then meet in a reopening auctionUS Limit Up-Limit Down pauses (Section 5.4: Price-Time Priority and Matching Engines) stop continuous trading for five minutes
Opening or closing auctionA market order gets the single auction price, not a walk through the bookAuctions match all orders at one price that maximizes executed volume
Extended-hours sessionsMany brokers accept only limit ordersBooks are thin and spreads wide, so a market order could fill far from value
Order larger than displayed depthA “market” order becomes a walk across several pricesEach price level holds limited shares (Section 5.1: The Order Book, Mechanically)
Stock at its price band (India)Orders beyond the band are rejected, and a stock locked at its band may not trade at allExchange price bands cap the daily move for most Indian stocks (see the India Lens at the end of this Part)
Decision Rule

If you hold a position through earnings, overnight news or a market closure, assume a stop-market order can fill anywhere below its trigger, and size the position so that a gap of two to three times the stock’s typical daily move is survivable in ordinary conditions; through earnings or other binary news, assume a gap of 15% to 20% or more (the worked example below gapped 18%). Use a stop-limit only if you would rather keep the position than sell below the limit. In liquid stocks during regular hours, a marketable limit (a few cents through the far side of the spread) gives near-certain execution with a price cap.

The Costliest Mistake

Treating a stop-loss as a guaranteed exit price. You own 1,000 shares bought at $100 with a stop at $95, expecting to lose at most (100 − 95) × 1,000 = $5,000. The stock opens at $82 after earnings and the stop fills at $81.90. Actual loss = (100 − 81.90) × 1,000 = $18,100, $13,100 more than planned. A stop-limit at $94 would not have filled at all, leaving an $18,000 paper loss still at risk. Only position size, or an option hedge such as a protective put, limits gap risk.

Frequently Asked Questions

What is the difference between a stop order and a stop-limit order?

A stop order becomes a market order when its trigger trades, so it executes but possibly far from the trigger. A stop-limit becomes a limit order, so it never sells below your limit but may not execute at all if the price falls through it quickly.

Should I use market orders or limit orders?

Use limit orders by default and market orders only for small trades in liquid stocks during regular hours. A limit set slightly through the far side of the spread fills almost as reliably as a market order and protects you from a thin book or a sudden quote change.

What is an iceberg order?

It is a large order that shows only a small slice in the book and refreshes the visible part as each slice fills. It hides size from other traders, but the hidden part usually ranks behind displayed orders at the same price, so it can fill more slowly.

✓ Section Recap

Order types trade execution certainty against price certainty: stops guarantee a trigger, not a price, and stop-limits cap the price but may not fill. Gaps, pauses, auctions and price bands change the standard answer, and in the worked example a $95 stop filled at $81.90, turning a planned $5,000 loss into $18,100.

✎ Check Yourself

Six questions on this chapter. Decide on your answer first, then click “Reveal Answer.”

1. You own 500 shares bought at $60 with a stop at $56. The stock gaps to open at $50 and the stop fills at $49.90. How much more did you lose than you planned?

  1. $5,050
  2. $2,000
  3. $3,000
  4. $3,050
Reveal Answer

Answer: D. Planned loss = (60 − 56) × 500 = $2,000; actual = (60 − 49.90) × 500 = $5,050; the difference is $3,050.

2. What is the main risk of a stop-limit order compared with a stop order?

  1. It shows its full size to every other trader in the book
  2. It always executes at the next trading day’s opening price
  3. It may not fill at all if the price gaps through the limit
  4. It may fill far below the trigger price in a fast market
Reveal Answer

Answer: C. A stop-limit becomes a limit order, so it caps the price but gives up the guarantee of execution.

3. Which order type fills the whole quantity immediately or cancels entirely?

  1. Fill-or-kill
  2. Midpoint peg
  3. Immediate-or-cancel
  4. Limit-on-close
Reveal Answer

Answer: A. Fill-or-kill requires the full quantity at once; immediate-or-cancel accepts a partial fill and cancels the rest.

4. Why can clusters of stop orders deepen a price fall?

  1. Brokers must halt trading once many stops have triggered
  2. Each triggered stop sends a market sell that walks the book
  3. Stops convert into limit buy orders that absorb liquidity
  4. Exchanges widen the spread each time a stop is triggered
Reveal Answer

Answer: B. Triggered stops arrive together as market orders, push prices down and trigger the next stops.

5. Worked problem: A stop-loss order at $48 triggers as the price gaps and a market order fills 1,000 shares at an average of $47.80. What is the slippage against $48?

Reveal Answer

Answer: Slippage = ($48.00 − $47.80) × 1,000 = $200.

6. Worked problem: A stop-limit order at $48 with a $47.90 limit would have filled how many of those shares at or above $47.90 if only 400 traded there?

Reveal Answer

Answer: Only 400 shares, and the other 600 would remain unfilled: certainty of price, not of execution.

Sources