What Is an Order Book?

Key Takeaways

  1. An order book ranks resting buy orders (bids) and sell orders (asks) by price, showing what liquidity is available before a trade executes.
  2. Most equity venues match orders using price-time priority: best price first, then earliest arrival; some derivatives venues use pro-rata matching based on size.
  3. Order-book depth determines market impact — a thick book absorbs flow with little price movement, and a thin book can move sharply on small orders.
  4. Displayed depth is not exhaustive: hidden, reserve, and iceberg order types can supply liquidity without appearing in the visible book.
  5. KDB-X can store and replay order-event streams to reconstruct book state at any historical point in time.

An order book is the live, price-ranked record of resting buy and sell interest at a trading venue. It is the market’s visible liquidity map: what is willing to trade, at what prices and in what size, before an aggressive order consumes it.

How the Order Book Works

The bid side shows resting buy orders, sorted from the highest price downward. The ask side shows resting sell orders, sorted from the lowest price upward. If two resting orders are at the same price, the venue’s matching rule determines which one fills first. On many equity venues, that is price-time priority: best price first, then earliest arrival. Some derivatives venues use pro-rata matching, where size can matter more than arrival time.

A simple order-book snapshot might look like this: bids at $50.00 x 400, $49.99 x 600 and $49.98 x 800; asks at $50.02 x 300, $50.03 x 500 and $50.05 x 700. A trader who sends an aggressive buy order for 700 shares will take 300 shares at $50.02 and then 400 shares at $50.03. The best ask rises from $50.02 to $50.03 because the first level has been fully consumed.

This is why order-book depth matters. A small order can trade at or near the touch when the book is deep. The same order can move the market when the book is thin, when displayed size is small, or when there is a gap between successive price levels.

Why the Order Book Matters

Execution quality, slippage and market impact all start with the shape of the book. A thick bid stack can absorb selling without moving the price much; a thin book can move sharply on very little flow. Traders use the book to decide whether to cross the spread immediately, work a passive order, or break a parent order into smaller pieces.

The order book is also central to understanding manipulative order-book behaviour. Spoofing and layering rely on placing orders that distort the visible book without a genuine intention to trade those orders as displayed. Analyses therefore need the book not just to measure liquidity, but to reconstruct how that liquidity changed over time and whether the displayed depth was credible.

The order book is not the same thing as the consolidated market. A single venue’s book reflects only that venue’s resting interest. The NBBO compares the best bid and best offer across venues, while the order book itself remains a venue-level object.

Common Order-Book Edge Cases

Not all liquidity is displayed. Hidden orders, reserve size and iceberg-style order types may interact with the visible book without showing their full size. That means the visible book is usually the most important liquidity signal, but not always the entire one.

Order books also evolve continuously. Cancels, partial fills, modifies and re-posts can all change queue position. For a passive trader, the question is not only “what price is available?” but “how much size is ahead of me, and how quickly is that queue changing?”

How KDB-X Handles Order-Book Data

KDB-X can store the incoming order-event stream once and replay it to reconstruct book state at any point in time. That makes it suitable for historical analysis, queue reconstruction, execution research and market-data workflows where point-in-time state matters. For capital-markets workflows, this same pattern is used to build depth views, time-sliced book snapshots and order-life-cycle analysis from one underlying event history.

Learn more: KX uses order-book pipelines and market-data accelerators to transform venue feeds into analysis-ready book structures. See Order Book Data and the KDB-X platform.

Frequently Asked Questions

What is price-time priority?

Price-time priority fills the best price first and, within that price, the earliest order first. It is the most common matching rule on equity venues.

What is pro-rata allocation?

Pro-rata allocation splits a fill across resting orders at the same price based on size rather than arrival time. It is more common in some derivatives markets.

How does the order book relate to the NBBO?

The NBBO is a cross-venue best bid and offer. The order book is venue-specific. The NBBO is built from many books, but any one book is only one piece of that picture.

Why does thin depth matter?

Thin depth means there is less resting size near the touch. A marketable order therefore has to move farther through the book to complete, which increases market impact.

Can hidden liquidity affect the book?

Yes. Hidden or reserve orders can supply liquidity without showing the full size in the visible book, so displayed depth is informative but not exhaustive.

Can an order book be reconstructed historically?

Yes, if the feed preserves the event sequence. Replaying adds, modifies, cancels and executions up to a timestamp reconstructs the book as it stood then.

Related Terms

  • MBO (Market by Order) — the order-level feed that shows the individual orders inside the book
  • MBP (Market by Price) — the price-level view that aggregates resting size
  • L1/L2/L3 Market Data — the depth tiers used to describe how much of the book is visible
  • Markout — a post-trade measure that is directly affected by the shape of the book
  • Layering — a manipulation pattern that tries to distort the visible book

Demo the world’s fastest database for vector, time-series, and real-time analytics

Start your journey to becoming an AI-first enterprise with 100x* more performant data and MLOps pipelines.

  • Process data at unmatched speed and scale
  • Build high-performance data-driven applications
  • Turbocharge analytics tools in the cloud, on premise, or at the edge

*Based on time-series queries running in real-world use cases on customer environments.

Book a demo with an expert

"*" indicates required fields

Step 1 of 2

This field is for validation purposes and should be left unchanged.


// social // social