Liquidity · Intermediate · 5 min

Order Book Depth and Slippage

Slippage is the gap between the price you expect and the price you get. This article shows how to estimate it from an order book snapshot and why it limits how far any strategy can scale.

Anatomy of an order book

An order book is two sorted lists. Bids are resting orders to buy, sorted from the highest price down. Asks are resting orders to sell, sorted from the lowest price up. Each price level aggregates the size of all orders resting there. The best bid and best ask together define the top of the book; the midpoint between them is the mid price.

Hyperliquid's l2Book info type returns an aggregated snapshot of this structure for a given coin: a list of bid levels and a list of ask levels, each with a price, total size and number of orders. LIQUIDO's book route requests that snapshot and renders it as a depth chart and ladder.

Snapshots move

A book snapshot is accurate only for the instant it was taken. Makers update quotes constantly, so treat depth as a typical condition to monitor over time, not a guaranteed quantity.

Walking the book

A market order consumes liquidity level by level. A buy fills against the best ask first, then the next ask, and so on until the full size is filled. The average price paid is the size-weighted average of every level touched, and it gets worse the more levels the order has to consume.

Average execution price
P_avg = Σ (p_i × q_i) / Σ q_i for each level i consumed, with Σ q_i = Q
Slippage against mid
slippage_bps = (P_avg − mid) / mid × 10,000 (for a buy; reverse the sign for a sell)

Slippage measured against the mid includes half the spread, which you pay even on the smallest order, plus the market impact of walking deeper into the book. For small orders the half-spread dominates; for large orders impact dominates.

A worked example

Consider a hypothetical ask side with a mid price of 100.00. The numbers are illustrative only and do not describe any real market.

Ask priceSize at levelCumulative size
100.052020
100.103050
100.2050100
100.40100200
  • Buying 20 fills entirely at 100.05: about 5 bps of slippage against the mid.
  • Buying 100 fills 20 at 100.05, 30 at 100.10 and 50 at 100.20, for an average of 100.14: about 14 bps.
  • Buying 200 also takes 100 at 100.40, for an average of 100.27: about 27 bps.

Doubling the order from 100 to 200 almost doubles the cost per unit. That non-linearity is why a strategy that is profitable at small size can become unprofitable as more capital follows it. Real books also refill after a large trade as makers post new quotes, so a patient trader who splits an order over time can often do better than this static calculation suggests, at the cost of exposure to price moves while waiting.

Depth and strategy capacity

A useful rule of thumb compares the size a trader typically trades with the depth available near the mid. If a vault routinely opens positions comparable to or larger than the depth within 1% of the mid, its fills are likely to carry meaningful impact, and that impact grows with every new dollar of capital.

Depth coverage ratio
coverage = depth(1%) / typical_order_notional
Higher is better. Values near or below 1 suggest the trader's orders regularly move the market.
  • Exits matter more than entries. A trader can enter patiently but may have to exit quickly during a liquidation cascade, exactly when depth is thinnest.
  • Depth is asymmetric. In a falling market bids often thin faster than asks, so long positions can be harder to unwind than they were to open.
  • Open interest relative to depth hints at how crowded a market is and how violent forced unwinding could become.

Turnover and the hidden cost of trading

Slippage is paid on every trade, so its total impact depends on how often a strategy trades. A trader who turns over the full portfolio several times a day pays the spread and impact far more often than one who holds positions for weeks. Even small per-trade costs compound into a large drag at high turnover.

Approximate execution drag
drag ≈ turnover × average_cost_bps / 10,000
Turnover is total traded notional divided by average equity over the period. Fees add to this.

Recent fills on a trader profile let you estimate turnover. Sum the notional of fills over a window and divide by the vault's average account value over the same window. Combine that with a slippage estimate from the order book and you have a rough sense of how much of the vault's gross edge is consumed by execution, and how much more would be consumed at larger size.

Makers, who post resting orders, can earn the spread instead of paying it, which is why some high-turnover strategies remain profitable. Fills that consistently occur at the best bid when buying, or the best ask when selling, hint at a passive approach. Fills that cross the spread hint at an aggressive one.

Using the liquidity explorer

  1. Pick a market from the explorer's table, ideally one that a trader on your watchlist holds.
  2. Read the spread and the cumulative depth on each side of the book.
  3. Estimate slippage for the trader's typical position size using the walking-the-book method.
  4. Check the daily candles for long wicks, which often mark moments when depth evaporated.
  5. Revisit the same market at different times; a single snapshot can be unrepresentative.

Depth analysis will not tell you whether a trade is a good idea. It tells you what a trade of a given size is likely to cost, and that cost is one of the few things about trading that can be estimated with reasonable confidence in advance.