Skip to main content Skip to main content
Not investment advice. Educational reading. See Disclaimer.
L.10 · BEGINNER · 3 MIN

Order Books and Price-Time Priority

Behind every trade is an order book -- a live, two-sided list of every resting buy order (bids) and every resting sell order (asks) at the exchange. The matching engine -- a piece of software running in milliseconds -- pairs incoming orders against the book using a simple rule. Understanding that rule explains why your order fills, why someone else's identical-looking order fills first, and what the bid-ask spread is actually telling you about how easy this stock is to trade.

Quiz · 5 questions ↓
§ 01

Price-time priority is the matching rule on every major US equity exchange. Better-priced orders execute first. Among orders at the same price, the one that arrived earliest executes first. There is no other tiebreaker -- not the size, not the broker, not the customer. The book is impersonal and strictly ordered.

§ 02
Book sideWhat you seeWhat it means
BidsList of buy orders, highest price at topHow many shares people will pay UP TO each price
Asks (offers)List of sell orders, lowest price at topHow many shares people will sell DOWN TO each price
Top of bookBest bid + best ask -- the National Best Bid and Offer (NBBO)The headline quote you see on a ticker page
DepthSizes available at the next several price levelsHow far the price moves if a large order eats through layers
§ 03

The spread is a liquidity gauge, not a fee. A penny-wide spread on a mega-cap means dozens of market makers are competing to sit at the top of the book. A 40-cent spread on a thinly traded micro-cap means almost nobody is willing to quote tightly -- if you need to trade now, you pay that gap. Spreads widen during stress, before earnings, and in the first and last few minutes of the session for predictable mechanical reasons.

§ 04

Displayed vs hidden liquidity. Not every resting order shows up on the public book. An iceberg order displays a small slice (say 500 shares) while the rest sits hidden; as the visible slice fills, the engine refreshes it. Other order types are fully hidden until they execute. The practical takeaway: the visible book under-states real liquidity. A stock can absorb more size than the displayed depth suggests, especially in the largest names where institutional flow routinely uses hidden order types.

§ 05
On any ticker page, look at the bid and ask near the top. The gap between them is the spread. Compare a mega-cap like MSFT (usually a one-cent spread) to a small-cap or thinly traded stock (often 5-50 cents). The spread is the round-trip cost of buying and immediately selling, before any commission.
§ 06
Two traders submit a buy order for 100 shares at $50.00. Trader A's order reaches the exchange at 10:00:00.001. Trader B's order reaches at 10:00:00.002. A seller hits both sides with 100 shares at $50.00. Whose order fills first under price-time priority?
§ 07

The order book is the truest picture of supply and demand at this instant. Price-time priority makes the matching engine fair AND fast -- no human judgment, no negotiation, just first-in at the best price wins.

Five questions · AI feedback

Sit with the ideas.

Vantage Asset Management is trying to buy 200,000 shares of a mid-cap stock that shows a top-of-book ask of 800 shares at $42.10. The next price level on the book has 1,200 shares at $42.15, then 2,000 shares at $42.20. The trader sends a single market order for all 200,000 shares. What happens, and what does it teach about displayed vs real liquidity?

Why:
See it on a real ticker →