imbalance_5Imbalance (5 levels)
Imbalance across five levels extends top-of-book pressure into the near-touch order book.
It reveals whether directional support is just a quote-level artifact or is backed by additional nearby depth.
L2 — Order Book
Shown: the median perpetual’s book depth across the top 25 levels, as a share of its 20:00–20:45 average, per venue, 18:00–01:00 UTC on 10 Oct 2025; minutes under half of normal take the strong tone, and the lowest of all, OKX’s 8.5% at 22:06, is orange · built with l2_liquidity 1m
L2 — Order Book Datasets
Multi-depth (5, 10, 20, 25 levels) order book imbalance, ratio, and averages.
Highlighted Metrics
imbalance_5Imbalance across five levels extends top-of-book pressure into the near-touch order book.
It reveals whether directional support is just a quote-level artifact or is backed by additional nearby depth.
imbalance_ratio_25The twenty-five-level imbalance ratio normalizes deep-book pressure over a broader slice of resting liquidity.
It is useful for understanding the full displayed environment that larger orders would have to push through.
bid_ask_ratio_25The twenty-five-level ratio extends that comparison deep enough to capture broader displayed inventory.
It is especially relevant for larger execution and for understanding whether apparent pressure near the touch is reinforced deeper in the ladder.
ask_agg_25_avgAverage Ask Aggregate across twenty-five levels smooths the deeper sell-side book over the interval.
That makes it a regime measure for how much overhead liquidity the market was consistently showing, not just flashing moment to moment.
bid_agg_25_avgAverage Bid Aggregate across twenty-five levels provides the broad matching view of displayed support.
Stronger readings indicate a deeper cushion of resting liquidity that can absorb pressure before the book thins out materially.
Market Microstructure Context
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
Get started in minutes
curl -fsSL https://raw.githubusercontent.com/aperiodic-io/cli/main/install.sh | bash# Install the Aperiodic CLI into ~/.local/bin
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/aperiodic-io/cli/main/install.sh | INSTALL_DIR="$HOME/.local/bin" bash
export PATH="$HOME/.local/bin:$PATH"
# Fetch the preview slice as Parquet into ./data — no API key needed
aperiodic flow --preview \
--exchange binance-futures \
--symbol perpetual-BTC-USDT:USDT \
--interval 5m \
--timestamp exchange \
--start-date 2025-05-01 \
--end-date 2025-05-31 \
--output-dir ./data && echo "Saved to $PWD/data"Get access to our full catalog of market microstructure data.
Shown: minute lows of the 465 Binance perpetuals, 20:40–22:00 UTC on 10 Oct 2025, with BTC’s path traced · built with ohlcv 1m