L2 — Order Book Datasets
Multi-depth (5, 10, 20, 25 levels) order book imbalance, ratio, and averages.
Key fields
Highlighted Metrics
Cont, Kukanov & Stoikov (2014) showed it clearly: order book imbalance predicts the direction of the next mid-price change, and the relationship is monotonic — stronger lean, larger expected move. The mechanism is straightforward. When one side is substantially thicker, the thinner side depletes first and the midpoint shifts. But the real insight is in the layers. L1 and L2 can tell contradictory stories, and the divergence between them is often more informative than either alone.
Use Cases
Measure aggregate bid and ask depth at multiple levels to understand resilience and liquidity beyond the top-of-book.
Build predictive features from multi-level imbalance ratios that capture directional pressure more robustly than L1 alone.
Detect large resting orders by monitoring depth anomalies and imbalance dynamics across book levels over time.
Quantify how quickly liquidity replenishes after consumption by analyzing depth averages and their variability.
Combine bid/ask depth at 5, 10, 20, 25 levels into composite signals for ML-based execution and alpha models.
Get started in minutes
pip install aperiodicfrom datetime import date
from aperiodic import get_metrics
df = get_metrics(
api_key="your-api-key",
metric="flow",
timestamp="exchange",
interval="1h",
exchange="binance-futures",
symbol="perpetual-BTC-USDT:USDT",
start_date=date(2024, 1, 1),
end_date=date(2024, 1, 31),
)
print(df.head())Get access to our full catalog of market microstructure data.