Signal Pilot
🟢 Beginner • Lesson 2 of 85

The Order Book

Reading time ~7 min • Module 1: The Mechanism
Signal Pilot
Professional Trading Education
0%
You’re making progress!
Keep reading to mark this lesson complete

The order book is every resting limit order at every price, and the quote is only its top line. On the ordinary book below, that top line describes 900 shares out of the 7,300 standing there, so the price you have been watching all day is a fact about 12 per cent of the market it claims to describe. What a trade costs you is decided by how far past it you have to reach.

Prerequisites: Lesson 1, for the limit order that posts a price and the market order that takes one. This lesson is those two, multiplied.

The previous lesson had two notices pinned to a wall. A real market has thousands, and the only thing that makes them usable is that they are sorted.

Sellers are listed cheapest first, because you would buy from the cheapest. Buyers are listed dearest first, for the same reason in reverse. The two lists meet in the middle, and the pair at the top — the highest bid and the lowest ask — is what gets quoted as the price. Everything underneath is called depth.

What a book looks like

SidePriceShares
Ask50.061,200
Ask50.05800
Ask50.04400
Ask50.03300
— the spread: one cent, and nothing trades in here —
Bid50.02600
Bid50.01800
Bid50.002,500
Bid49.99700

The quote is 50.02 bid, 50.03 ask, and the spread is a penny. That is the whole of what most screens show you, and it describes 900 shares out of the 7,300 standing in this book.

Notice the 2,500 sitting at 50.00. Nothing about the quote hints at it. A round number has drawn a crowd — whether that crowd is still standing there when price arrives is a different question, and one this lesson comes back to. No chart carries it, at any timeframe.

A market order eats the list

You send a market order to buy 1,500 shares. There are only 300 at the best ask, so those fill first. The next 400 fill at 50.04, and the remaining 800 at 50.05.

You saw 50.03 on the screen. Work out what you paid:

300 × 50.03 = 15,009
400 × 50.04 = 20,016
800 × 50.05 = 40,040
1,500 shares for 75,065, an average of 50.0433

The quote said 50.03 and you paid 50.0433. That gap — $0.0133 a share, or $20 on the order — is slippage, and nobody charged it to you. You created it by needing more shares than were standing at one price.

Now send the same order type at the same instant for 300 shares instead. Every share fills at 50.03. No slippage at all.

Same instrument, same second, same instruction, and the cost per share is different. What changed was your size measured against the size resting in front of you. That ratio, not the quote, is what determines the cost of trading.

Standing in line

The other half of the book is one you cannot see from the numbers: within a single price, orders fill in the sequence they arrived. First in, first served.

So when you post a limit order to buy at 50.02 and 600 shares are already there, you are not at 50.02. You are behind 600 shares at 50.02. If 400 shares get sold into that level, all 400 go to people who arrived before you, and you are still waiting. You get filled only after the queue in front of you is gone — or after those people cancel, which is what usually happens.

Which is the part worth carrying forward. A book is not a set of prices. It is a set of promises that may be withdrawn, and in modern electronic markets far more orders are cancelled than are ever executed. So the 2,500 shares at 50.00 are not a floor. They are 2,500 shares whose owners have not yet changed their minds, and you find out which when price gets there. What you are looking at is not supply and demand. It is supply and demand as currently advertised.

The number to know about your own instrument

Take the book above and ask a different question: what is the largest market buy that fills entirely at the quote? Three hundred shares. At 301 you are paying more than you were quoted.

At $50 a share, 300 shares is a $15,000 position. If you trade $5,000 positions in this name, the quoted spread is your real cost and the depth never concerns you. If you trade $50,000 positions, the quote is fiction: you will always walk three or four levels, and your true cost is several times the spread you were looking at.

Two traders with identical strategies, identical timing and identical conviction, trading different size, get different results in this instrument, and the difference is decided before either one is right or wrong about anything. This is why lesson 12 asks what you should trade before any lesson asks how. Finding out which of the two you are takes one session and a notebook, and almost nobody trading this instrument has ever done it.

What this does not settle

The displayed size is not necessarily all the size. Traders who do not want to reveal how much they hold can post a fraction and refresh it as it fills, so a book showing 300 may be backed by 30,000 — lesson 9 explains who does this and why, and lesson 31 covers how to detect it.

Nor is the displayed size necessarily real intent. An order that can be cancelled in a microsecond costs almost nothing to place, which makes a book an unreliable witness about what anybody actually wants. Lesson 26 is entirely about telling the two apart, and it will make more sense now that you have seen what an honest book looks like.

Every number above is also one instant. A book is not a photograph you get to study; it changes between the moment your eye reads the quote and the moment your order arrives, and the 300 shares at the top may be somebody else’s fill by the time you get there. The arithmetic on this page is exact, and the market it describes held still while we did it. Nothing on a real screen holds still.

Finally, this is one venue. US equities trade across dozens of them at once, and what your broker shows you may be a consolidated best bid and offer with no depth behind it at all. That does not change the arithmetic above; it changes how much of the arithmetic you are allowed to see.

Which leaves the queue you were just told to stand in, and it is the one thing here you cannot look up. First in, first served is the rule, and almost no venue publishes where in the line your order actually sits. You can work out your place going in, from the 600 that were resting there when you posted. After that you are blind, and the single number deciding whether a patient order ever trades is the number the book will not show you.

The quote tells you the price of the next share. The book tells you the price of yours.

Problems

  1. Walking the other way. Using the book above, you send a market order to sell 2,000 shares. Compute the average price you receive and the total slippage against the quoted bid, in dollars.
  2. The queue. You post a limit buy at 50.02, joining the 600 already resting there. Over the next minute, 400 shares trade at 50.02 and the price then rises to 50.06 without returning. Were you filled? Say exactly what would have had to happen for you to be.
  3. Your own depth, ten times over. Open the depth for something you actually trade and record the size at the best bid and the best ask. Do it ten times across one session, including the first ten minutes and the last ten. Each time work out the largest market order that would fill entirely at the quote. You now hold ten numbers: report the smallest, the largest, and how many of the ten sit below your usual position size. That last count is the share of an ordinary day on which the quote you trade against is fiction.

Sources. Larry Harris, Trading and Exchanges (Oxford, 2003), chapters 4–6, for order precedence and the mechanics of a limit order book. Joel Hasbrouck, Empirical Market Microstructure (Oxford, 2007), for the measurement of what walking the book actually costs.

You can now read a book and price your own order against it. The next lesson follows one order through the moment it becomes a trade, and finds that you never meet the market at all. You meet one person who chose that moment, which is why the fills you get are not a fair sample of the fills that were there.

Related Lessons
Lesson 1

What a Market Solves

The two notices this book is made of, and why a spread exists at all.

Read Lesson →
Lesson 3

What a Fill Actually Is

What happens in the instant your order meets somebody else’s.

Read Lesson →
Lesson 9

Who Else Is Here

Who posts the resting orders, and why the reason predicts the behaviour.

Read Lesson →
Lesson 12

What Should You Actually Trade?

Depth against position size, turned into a ranking across instruments.

Read Lesson →
Educational only. Trading involves substantial risk of loss. Not financial advice. Past performance does not guarantee future results.

💬 Discussion (0 comments)

0/1000

Loading comments...

← Previous Lesson Next Lesson →

Ready to Trade with Signal Pilot?

Apply your trading education with professional indicators and real-time market analysis tools.

Back to Signal Pilot →