0bps

Learn / Track VII / lesson 1 of 4

The limit order book

How trades actually happen — bids, asks, queues and order types — and the short-horizon signals hiding in the book.

10 min read

Orders and the book

Most modern exchanges run a continuous limit order book. Two kinds of order arrive:

  • A limit order says “buy up to qq at price pp or better” and rests in the book until filled or cancelled. It provides liquidity.
  • A market order says “buy qq now at whatever price” and executes immediately against resting limit orders. It takes liquidity.

The book holds resting bids (buy orders) below resting asks (sell orders). The highest bid and lowest ask are the best bid and best ask; together, the top of book.

Key quantities

  • Spread: s=pask−pbids = p_{\text{ask}} - p_{\text{bid}}, the cost of a round trip for a market-order trader.
  • Mid price: m=(pask+pbid)/2m = (p_{\text{ask}} + p_{\text{bid}})/2.
  • Depth: the quantity resting at and near the top. Thin depth means large orders move the price.
  • Tick size: the minimum price increment. When the tick is large relative to price, spreads sit at one tick and queues get long.

Priority and the queue

At the same price level, orders typically fill in price–time priority: first come, first served. Your position in the queue determines whether your limit order fills before the price moves away. Being early in the queue is valuable enough that high-frequency firms spend heavily on speed to get there.

Exchanges also offer variants: post-only (cancel if it would take liquidity), immediate-or-cancel, fill-or-kill, iceberg orders that show only part of their size, and in crypto, reduce-only orders for derivatives.

Fees: maker and taker

Many venues charge takers more than makers, sometimes paying makers a rebate. This makes the effective spread for a liquidity provider wider than the quoted one, and the cost for a taker higher. Your strategy’s choice of order type can matter more than its signal.

Signals in the book

Order-book imbalance at the top of book,

I=qbid−qaskqbid+qaskI = \frac{q_{\text{bid}} - q_{\text{ask}}}{q_{\text{bid}} + q_{\text{ask}}}

ranges from −1-1 to 11 and is a well-known short-horizon predictor of the next mid-price move: more resting size on the bid than the ask suggests upward pressure. A related quantity, the micro-price, weights the bid and ask by the opposite side’s size:

pmicro=qask pbid+qbid paskqbid+qaskp_{\text{micro}} = \frac{q_{\text{ask}}\,p_{\text{bid}} + q_{\text{bid}}\,p_{\text{ask}}}{q_{\text{bid}} + q_{\text{ask}}}

and is a better estimate of “fair” price than the mid.

Trade flow — the signed volume of aggressive buys minus sells — carries information too; persistent one-sided flow often precedes further moves.

Common mistake

Backtesting book-based signals on snapshot data and assuming you trade at the mid. These signals predict moves of a fraction of the spread over seconds. After crossing the spread and paying taker fees, most of them are unprofitable for anyone but a fast liquidity provider.

Next: how liquidity providers price their quotes in market making.

esc

Try , , or .

↑↓ move↵ open