Understand Level-2 - market depth data
WHAT is Level-2 data?
WHY it exists: Modern exchanges match orders by price-time priority. To do that they must keep an ordered queue of every unfilled limit order. Level-2 is simply that queue made visible to you.

HOW the book is structured (derive it from the matching rule)
Start from first principles: an exchange wants to match a buyer and seller only when prices cross. So it stores orders in two sorted stacks.
Bid side (buyers): sorted from highest price at top downward. Reason (WHY): the buyer offering the most money deserves to trade first → highest bid has priority.
Ask side (sellers): sorted from lowest price at top upward. Reason: the seller asking the least deserves to sell first → lowest ask has priority.
The top of book = highest bid meets lowest ask. By construction:
Within one price level, orders are queued by time (FIFO): first order in = first filled. This is why joining a big queue late means you may never get filled at that price.
Cumulative depth (the quantity that traders actually watch)
Each level shows size . The useful object is cumulative depth — how much total volume you'd sweep if you kept buying/selling into the book.
Let ask levels be prices with sizes . To buy shares by hitting the offers, the cumulative shares available up to level :
The average fill price for a market buy of size (marketable order eating levels until filled):
where you fill level 1 fully, then level 2, etc., until is exhausted at level .
Worked Examples
Consider this book snapshot for stock XYZ:
| Bid Size | Bid | Ask | Ask Size | |
|---|---|---|---|---|
| 300 | 100.00 | 100.05 | 200 | |
| 500 | 99.95 | 100.10 | 400 | |
| 800 | 99.90 | 100.15 | 1000 |
Forecast-then-Verify drill
Before reading on: You place a market buy of 700 shares into Example 1's book. Forecast the average price.
Verify
200@100.05 + 400@100.10 + 100@100.15 = 20010 + 40040 + 10015 = 70065. \bar P = 70065/700 = \100.0929. Slippage ≈ \0.0429. You should have predicted a higher average than Example 2 because 700 > 500 digs deeper.
Common Mistakes (Steel-manned)
Active Recall
Recall Self-test (hide and answer)
- Why can the best bid never exceed the best ask in a resting book?
- Derive the slippage formula and say what makes each term positive.
- Why doesn't large bid depth guarantee a price rise?
- What is the difference between Level-1 and Level-2 data in one sentence?
Recall Feynman: explain to a 12-year-old
Imagine an ice-cream stall. Level-1 just tells you the price of the last cone that was sold. Level-2 lets you peek at two queues: one line of kids wanting to buy (each holding up how many cones and the price they'll pay) and one line of sellers. The stall matches the kid paying the most with the seller asking the least. If you want to buy a LOT of cones at once, you gobble up the cheapest sellers first, then have to take costlier ones — so your average price creeps up. That creep is slippage. And a huge line of buyers doesn't mean prices jump — those kids are just waiting; they might walk away any second.
Connections
- Order Flow & Tape Reading — the tape is the executions; Level-2 is the intentions.
- Bid-Ask Spread — the residual gap this note derives.
- Slippage & Market Impact — direct consequence of finite depth.
- Limit vs Market Orders — limit orders build the book, market orders consume it.
- Order Book Imbalance Signals — quantifying pressure from depth.
- Spoofing & Layering — why depth can lie.
- Price-Time Priority — the matching rule that generates the whole structure.
What does Level-1 market data show?
What does Level-2 (market depth) data show?
How are bids sorted in the order book?
How are asks sorted?
Why is the resting spread always positive?
Define the spread formula.
What is slippage?
What tie-breaks orders at the SAME price level?
Why doesn't large bid depth guarantee price goes up?
What liquidity is invisible in Level-2?
Order-book imbalance formula?
Which order type consumes the book vs builds it?
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Dekho, Level-1 data sirf itna batata hai ki last trade kis price pe hua aur top pe best bid–best ask kya hai. Lekin Level-2 (market depth) ek jhaanki deta hai poore order book ki — yaani buyers ki poori line (bids) aur sellers ki poori line (asks), har price level pe kitni quantity wait kar rahi hai. Bids hamesha upar se neeche high-to-low sort hote hain (jo sabse zyada de raha hai usko pehli priority), aur asks low-to-high (jo sasta bech raha hai usko pehli priority). Beech ka gap = spread.
Ab sabse important cheez: jab aap ek bada market order maarte ho, toh aap pehle sabse best price wala level khaate ho, phir agar quantity bachi toh next worse level pe jaate ho. Isi wajah se aapka average price top price se bigad jaata hai — isi bigadne ko slippage kehte hain. Chhota order = kam slippage, bada order = zyada slippage. Yehi reason hai ki thin (patla) book mein bade order mehenge padte hain, chahe spread tight ho.
Ek badi galti jo naye traders karte hain: "bid side pe bahut size hai, matlab price upar jayega." Bhai, yeh passive orders hain — yeh sirf wait kar rahe hain, khud se price nahi badhaate. Woh spoof bhi ho sakte hain (fake, execute hone se pehle cancel). Price ko sirf aggressive orders (jo tape pe execute hote hain) hilaate hain. Isliye rule yaad rakho: Depth = patience, Tape = action. Aur yaad rahe — jo dikh raha hai wahi sab kuch nahi; hidden aur iceberg orders screen pe nazar nahi aate.