You’ve placed orders. You know “market” means fill me now and “limit” means this price or better. But where do those orders actually go, and how does a tap on your phone collide with a stranger’s tap on the other side of the planet to produce a price? The answer is one elegant data structure that sits at the heart of nearly every modern exchange — stocks, futures, crypto, even prediction markets: the limit order book. Understand it and the entire rest of this course falls into place, because every other idea — spreads, slippage, makers, adverse selection — is just something that happens to this book.
Before you read — take a guess
Pretest your instincts. A limit order book has buyers stacked on one side and sellers on the other, with a gap in the middle. Why does that gap — where no orders sit — exist at all?
What a limit order book actually is
Analogy. Picture a second-hand ticket exchange for a sold-out concert, run as two public noticeboards side by side. On the left board, hopeful buyers pin notes: “I’ll pay up to $80.” On the right board, sellers pin notes: “I’ll let mine go for $90 or more.” Anyone can walk up, read every note, and pin their own. A deal happens the moment someone’s “willing to pay” meets someone’s “willing to accept.” The two boards, with all their pinned notes sorted by price, are the order book.
Definition. A limit order book (often just the book, or LOB) is the complete, continuously-updated list of all resting limit orders for an asset, organized into two sides:
- The bid side — buy orders, each saying “I’ll buy up to N shares at price P or lower,” sorted with the highest price on top.
- The ask side (or offer side) — sell orders, each saying “I’ll sell up to N shares at price P or higher,” sorted with the lowest price on top.
The single best price on each side has special names: the best bid (highest buy price) and the best ask (lowest sell price). Together they’re the top of book or inside market, and the gap between them is the bid–ask spread. Everything below the best bid and above the best ask is depth — orders waiting their turn at worse prices.
Here is a live one. Hit Start feed to watch resting orders pulse as liquidity is posted and cancelled, then fire a market buy or sell and watch it reach across the spread and consume resting orders.
Asks · sellers
Bids · buyers
- Best bid
- $49.95
- Best ask
- $50.05
- Midpoint
- $50.00
- Spread
- $0.10
The book is a living ledger: buyers stack on the bid side, sellers on the ask side, and the gap between the best of each is the spread. A market order does not rest — it reaches across the spread and eats resting orders until it is filled.
Notice three things the simulator makes obvious. First, the book has two sides and a gap — buyers below, sellers above, spread in the middle. Second, it’s alive: sizes flicker constantly as traders post and cancel orders, even when no trade happens. Third, a market order doesn’t join the book — it reaches across the spread and eats resting orders until it’s filled. Hold those three facts; the rest is detail.
Maker orders rest; taker orders cross
Analogy. Back at the ticket boards: pinning a note and waiting is making a market — you’re providing an option for others. Walking up and immediately taking someone’s existing note is taking liquidity — you consume what others provided. Same person can do either on different days; the action is what counts, not the identity.
Definition. Every order is one of two roles the instant it hits the book:
- A maker (or passive, liquidity-providing) order rests in the book because it’s priced where it can’t trade immediately — a buy below the best ask, a sell above the best bid. It adds a resting order and waits.
- A taker (or aggressive, liquidity-removing) order is priced to trade right now — it crosses the spread and matches against resting orders, removing them. A market order is always a taker. A marketable limit order (a buy priced at or above the best ask) is also a taker.
This is the single most important reframing in the whole course: a limit order isn’t automatically a maker. If you place a limit buy above the current ask, it crosses and takes liquidity just like a market order would. Maker-vs-taker is about where you price it relative to the book, not about which button you pressed.
Sort each order by the role it plays the instant it reaches the book. (Best bid is $50.00, best ask is $50.05.)
Place each item in the right group.
- Limit sell at $49.95 (below the bid)
- Limit buy at exactly $50.00 (joins the best bid)
- Limit buy at $49.90
- Market buy for 100 shares
- Limit buy at $50.10 (above the ask)
- Limit sell at $50.20
How a match actually happens: price–time priority
So you’ve fired a marketable order. Which resting orders does it trade against, and in what order? Exchanges answer with a strict rule called price–time priority (also price–time-FIFO), and it has two tiers.
Definition.
- Price priority comes first. A buy taker matches the lowest asks first; a sell taker matches the highest bids first. You always get the best available price before any worse one — non-negotiable.
- Time priority breaks ties. Among multiple resting orders at the same price, the one that arrived earliest fills first. It’s a literal first-in, first-out queue at each price level. Being early in line at a price is a real, valuable asset — it’s why traders fight over microseconds.
Analogy. It’s a bakery with numbered tickets, but sorted by how little you’ll accept, then by who got there first. The baker (an incoming buyer) serves the cheapest loaf first; if two sellers both ask the same lowest price, the one who showed up earlier gets the sale. Show up late at a popular price and you wait behind everyone who beat you there.
Worked example — walking the queue
A market buy for 400 shares arrives. The ask side looks like this (best ask on top), and within the $100.10 level two makers are queued by arrival time:
| Ask level | Price | Resting size | Queue note |
|---|---|---|---|
| Best ask | $100.10 | 250 | Maker A (arrived 9:30:01.2), then Maker B (arrived 9:30:04.8) |
| Next | $100.20 | 500 | Maker C |
Price priority sends the order to $100.10 first. Within that level, Maker A is first in line, so:
- Maker A’s full 250 shares fill at $100.10 (A was earliest).
- 150 shares still needed. The $100.10 level is now exhausted, so we climb to $100.20.
- 150 of Maker C’s 500 fill at $100.20; C’s remaining 350 keep resting.
Total: 250 × $100.10 + 150 × $100.20 = $25,025 + $15,030 = $40,055 for 400 shares → average fill $100.1375. Notice Maker B at $100.10 got nothing — A’s queue priority consumed the whole level. That’s time priority in cold numbers: same price, but being 3.6 seconds earlier was the difference between a full fill and zero.
Think first
Same book, but now Maker B at $100.10 had arrived BEFORE Maker A. The 400-share market buy comes in. Who fills, and what changes about the average price?
Hint: Price priority is unchanged ($100.10 before $100.20). Only the within-level queue order flipped.
Misconception: 'the order book shows the price of the stock'
There is no single price in the book — there’s a best bid, a best ask, a spread between them, and a stack of depth on each side. The number on your trading app’s headline is usually the last trade, a historical fact. The book shows the prices you could actually transact at right now, which are two different numbers, not one.
The book is alive: cancellations and the illusion of depth
Here’s what surprises people most: the vast majority of orders in a modern book never trade — they’re cancelled. On many liquid markets, well over 90% of submitted limit orders are cancelled before any fill. Makers constantly post, reprice, and pull quotes as conditions shift — that’s the flickering you saw in the live book even when no trade printed.
Why cancel so much? A maker quoting both sides wants to stay near the action without getting picked off. As the fair price drifts, they cancel stale quotes and repost at new levels — thousands of times a second for automated makers. Resting an order is making a promise to trade; cancelling is withdrawing that promise before someone holds you to it at a bad moment.
This has a sharp consequence: displayed depth can be ephemeral. A book that looks 10,000 shares deep can thin out in milliseconds if makers yank quotes the instant a large order appears. “There was plenty of liquidity” and “I got filled at a great price” are not the same statement — the depth you saw may evaporate exactly when you try to use it. This is also the seed of practices like spoofing (posting orders you intend to cancel, to fake demand) — illegal market manipulation, and a reminder that the book is a strategic arena, not a static price list.
On a busy liquid market, roughly what fraction of submitted limit orders end up cancelled rather than filled, and why does it matter?
Reading the book: bid, ask, spread, depth
Let’s make the vocabulary muscle-memory, because the next six lessons lean on it constantly.
| Term | What it is | Where it sits |
|---|---|---|
| Best bid | Highest price a buyer will pay now | Top of the bid side |
| Best ask | Lowest price a seller will accept now | Top of the ask side |
| Bid–ask spread | Best ask − best bid | The gap in the middle |
| Mid price | (Best bid + best ask) / 2 | A reference “fair” point in the gap |
| Depth | Resting size available at each price level | Stacked below/above the top of book |
| Top of book | The best bid and best ask together | The inside market |
Worked example — reading a snapshot
The book shows: best bid $49.98 (size 800), best ask $50.02 (size 600), with another 1,500 shares bid at $49.96 and 2,000 offered at $50.04.
- Spread = $50.02 − $49.98 = $0.04.
- Mid price = ($49.98 + $50.02) / 2 = $50.00.
- A market buy for 600 shares fills entirely at the best ask, $50.02 — it fits within top-of-book size, so no walking, no extra slippage.
- A market buy for 900 shares takes all 600 at $50.02, then 300 at $50.04: average = (600 × $50.02 + 300 × $50.04) / 900 ≈ $50.0267. The extra 300 shares cost you the climb to the next level.
That climb — paying worse prices as your order outgrows the top level — is slippage, and we’ll dissect it in its own lesson. For now, the point is that you can read it off the book in advance: depth tells you how big a trade the top can absorb before the price moves.
Lock in the anatomy — one choice per blank.
Pick the right option for each blank, then check.
The highest resting buy price is the , and the lowest resting sell price is the . Their difference is the , and their average is the . Orders waiting at worse prices below and above the top of book are the market's .
Match each order-book term to its precise meaning.
Pick a term, then click its definition.
A common trap: limit ≠ maker, market ≠ the only taker
Two misconceptions worth killing outright:
- “Limit orders always rest.” False. A marketable limit order — a buy priced at or above the ask, a sell at or below the bid — crosses immediately and is a taker. The limit price just caps how far it’ll chase. You can take liquidity with a limit order on purpose; it’s the sane way to cross a spread with a safety rail (you met it as the “marketable limit” last course).
- “Market orders see the screen price.” They see the book. A market buy starts at the best ask and walks up through the levels if it’s bigger than the top, exactly as the worked examples showed. The headline last-trade price is irrelevant to the fill.
Best bid is $20.00, best ask is $20.04. Select every statement that is true.
Putting it together
The limit order book is the beating heart of modern markets: two sorted sides of resting limit orders, a best bid and best ask bracketing a spread, and depth stacked behind them. Makers post and wait; takers cross and consume. Matches obey price priority first (best prices win) and time priority second (earliest in the queue wins at a given price). And the whole thing is alive — most orders are cancelled, not filled, so displayed depth is a snapshot of intentions, not a promise. Every concept in the rest of this course is something that happens to this structure.
Big picture
The limit order book — the whole machine
- Limit order book
- Two sides
- Bid side: buyers, highest on top
- Ask side: sellers, lowest on top
- Top of book = best bid + best ask
- Spread = ask − bid; mid = average
- Two roles
- Maker: rests, adds liquidity
- Taker: crosses, removes liquidity
- Marketable limit = taker, not maker
- Matching rules
- Price priority: best price first
- Time priority: earliest at a price first
- Queue position is a real asset
- A living book
- Most orders cancelled, not filled
- Displayed depth can vanish
- Spoofing fakes depth (illegal)
- Depth
- Resting size beyond the top
- Tells you how big a trade the top absorbs
- Walking it = slippage (next lessons)
- Two sides
One mixed recap before you move on:
Best bid $30.00 (size 500), best ask $30.06 (size 400, two makers: P earliest then Q). A market buy for 250 shares arrives. Who fills it?
Check your answer to continue.
Key Takeaways
What to remember
- The book has two sorted sides and a gap. Bids (buyers) with the highest on top, asks (sellers) with the lowest on top, and the bid–ask spread between the best of each.
- Maker vs taker is about price, not the button. Makers rest and add liquidity; takers cross the spread and remove it. A marketable limit order is a taker; a limit order is not automatically a maker.
- Matches obey price–time priority. Best price fills first (price priority); among equal prices, the earliest-arriving order fills first (time priority). Queue position is a genuine asset.
- The book is alive. Most submitted orders are cancelled, not filled, so displayed depth is a snapshot of intentions that can vanish in milliseconds — “there was liquidity” and “I got a great fill” are different claims.
- You read the book, not the headline. Best bid, best ask, spread, mid, and depth are all visible; the last-trade price on your app is history. Your fill comes from the live book.