L1 — Top of Book Datasets
Best bid and ask prices with quantities, midprice, quantity-weighted midprice, time/volume-weighted averages, and quote update frequency.
Key fields
Bid/ask imbalance, ratio, percentages — both instantaneous (last) and averaged over the interval.
Key fields
Highlighted Metrics
The spread is the price of immediacy — what the market maker charges to bear adverse selection risk right now. Huang & Stoll (1997) decomposed it into adverse selection, inventory, and order processing costs, which is why a widening spread is diagnostic, not just expensive. But the average hides the regime change: a bar with mean spread of 2 bps that was 0.5 bps for 55 seconds and 8 bps for 5 seconds tells a fundamentally different story than a steady 2 bps. Bollerslev & Melvin (1994) showed spread volatility itself predicts future return volatility — the instability of the spread matters as much as its level.
Use Cases
Use average and instantaneous spread metrics to quantify market-making costs and estimate fill quality across instruments.
Detect directional pressure from bid/ask imbalance and imbalance ratio dynamics before price moves occur.
Identify quote stuffing patterns and measure market-maker activity intensity using update frequency metrics.
Compare execution fills against bid/ask VWAP and TWAP to measure adverse selection in your order flow.
Use weighted mid-price, imbalance averages, and depth to build predictive features for HFT and MM strategies.
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.