Orders & Execution
Order Book (L2)
The visible resting buy and sell quantities at quoted price levels. Level-2 data shows multiple levels beyond the best bid and ask.
The order book is where unexecuted limit orders wait. Each price level holds a queue of resting size; the best bid and best ask form the spread, and everything behind them is depth.
Level 1 data is the touch: the best bid and ask and usually their sizes. Level 2 (L2) publishes several visible price levels and quantities. It is not the full market: feed depth is finite, hidden orders do not appear, and displayed orders can be changed or cancelled.
Why depth matters
Suppose the asks show 0.8 BTC at $64,000 and 0.9 BTC at $64,001.50. A 1 BTC market buy can take 0.8 at the first level and 0.2 at the second, for a volume-weighted average of $64,000.30 before fees. The larger order paid more than the best displayed ask because it consumed depth. Bybit's official order-book response documents ordered bid and ask levels as price-and-size pairs; the precise depth and update rules depend on the selected endpoint and market.
L2 in backtesting
Snapshots introduce limitations. Orders can arrive, trade, or disappear between snapshots, and visible size ahead of an order is not a promise that the researcher's order would fill. A historical L2 simulation can make slippage depend on recorded depth, but it still models queue position, latency, and missing updates. A common misconception is that L2 therefore recreates a live fill exactly.
On AlphaProve
AlphaProve can use recorded, minute-resolution L2 depth to price simulated
fills when the selected market and date range have coverage. Its conventional
fill path uses candle data and explicit cost assumptions. Strategy code does
not receive the book: ctx.orderbook is unavailable, while candle buy volume,
sell volume, and CVD can support order-flow rules. The public
strategy-authoring reference states that boundary,
and CVD order flow explained shows why a
trade-flow indicator is different from resting depth.