Aperiodic
MarketsLive
Pricing
Get Started

Metrics library · L1 & L2 order book

L1 price

Get the data
BTC-USDT perpetual on Binance, 5m bars, 1 to 31 May 2025, from the free preview. The free delayed feed doesn't carry this dataset; paid plans stream it in real time.
How it's builtBTC, May 2025FieldsDownloadFAQ

The best bid and ask and the size at each, from every quote update, with the microprice.

Best bid and ask prices with quantities, midprice, quantity-weighted midprice, time/volume-weighted averages, and quote update frequency.

Built from
L1 (Top of Book)
Fields
12
Intervals
1m to 1d; 15s and 30s on Prime
Plan
Pro
Venues
Binance, OKX, Hyperliquid
Live
Real time on paid plans

How it's built

One real 5-minute bar from the free preview, field by field.

The 5m bar from 14:00 to 14:05 UTC on 14 May 2025, Binance BTC-USDT perpetual, from the free preview.

  1. Step 1

    Take the last quote

    The venue sends the best bid and ask each time either changes, 5,339 times in this bar. The plain fields hold the last quote.

    best ask7.712 BTC$103,805.7
    best bid7.266 BTC$103,805.6
  2. Step 2

    Mid and microprice

    midprice=(bid + ask) / 2=$103,805.65
    weighted_midprice=(bid × 7.712 + ask × 7.266) / 14.978=$103,805.6485

    Each price is weighted by the size on the opposite side, so the microprice sits nearer the thinner side. The ask had a little more size here, so the microprice is slightly below the mid. The stored field rounds it to $103,805.65.

    best ask7.712 BTC$103,805.7
    best bid7.266 BTC$103,805.6
    bid $103,805.6ask $103,805.7mid $103,805.65microprice $103,805.6485

    The $0.10 spread, enlarged.

  3. Step 3

    Average over every update

    bid_price_twap=Σ bid / 5,339 updates=$103,820.59
    bid_price_vwap=Σ (bid × bid size) / Σ bid size=$103,819.14

    Like the trade TWAP, these weight every update equally, not by how long each quote stood.

    $104,222.8$103,563.2
    13:0514:00

    Bid and ask at the close of each 5-minute bar, over the hour up to this one.

  4. Step 4

    The bar

    bid_price
    $103,805.6
    ask_price
    $103,805.7
    bid_amount
    7.266 BTC
    ask_amount
    7.712 BTC
    midprice
    $103,805.65
    weighted_midprice
    $103,805.65
    ask_price_twap
    $103,820.72
    ask_price_vwap
    $103,825.80
    quote_update_frequency
    5,339

Does the microprice call BTC's next move?

The microprice got the direction of BTC's next 5-minute move right 52.3% of the time.

BTC-USDT perpetual on Binance, 5m bars, 1 to 31 May 2025, from the free preview.

Mean mid-price move over the next 5 minutes
-1.15
-0.305
-0.102
-0.046
-0.014
-0.211
0.296
0.003
1.20
1.56
12345678910

Bars by microprice lean at the close, most to the bid to most to the ask. Basis points.

Bars sorted by how far the microprice sat from the mid at the close. The middle eight tenths show no pattern. The tenth leaning hardest to the ask was followed by a 1.56 bps move up on average, the tenth leaning hardest to the bid by 1.15 bps down.

The book updated 15 times a second (4,548 quote updates in a median bar), and the microprice predicts over seconds. At 5 minutes only the strongest leans show.

How to read it

bid_price, ask_price, bid_amount and ask_amount are the best quote and its size at the end of the interval. midprice is their average.

weighted_midprice weights each side by the size on the other, so it moves toward the side with less size. Above the mid means the ask is thinner.

quote_update_frequency counts best-quote updates in the interval, avg_update_interval the time between them in milliseconds. A venue that goes quiet shows here first.

ask_price
Last best ask price in the interval
bid_price
Last best bid price in the interval
ask_amount
Last best ask quantity in the interval
bid_amount
Last best bid quantity in the interval
quote_update_frequency
Number of top-of-book quote updates in the interval
avg_update_interval
Average milliseconds between top-of-book quote updates
midprice
Midpoint between the last best bid and ask prices
weighted_midprice
Midprice weighted by the opposite-side top-of-book quantity
All 12 fieldsFewer fields
bid_price_twap
Average best bid price in the interval
ask_price_twap
Average best ask price in the interval
bid_price_vwap
Bid-price average weighted by best bid quantity
ask_price_vwap
Ask-price average weighted by best ask quantity
The research behind itHide the research

L1 data — the best bid and best ask at any moment — appears deceptively simple. Four numbers: two prices, two quantities. But the derived metrics reveal the real-time behavior of market makers and the microstructure of price formation in ways that trade data alone cannot capture.

Beyond the midprice

The standard midprice, (bid + ask) / 2, treats both sides equally. But Stoikov (2018) showed that the quantity-weighted midprice — which shifts the midpoint proportional to the size available at each side — is a significantly better predictor of the next transaction price. If the bid carries 10× the size of the ask, fair value isn't halfway between them; it's closer to the ask, reflecting the imbalance in immediately available liquidity.

We compute both the standard and weighted midprice, plus their time-series counterparts:

  • Bid/Ask TWAP — time-weighted average of the best bid/ask over the interval. This reveals how quote behavior evolved within a bar, not just where it ended.
  • Bid/Ask VWAP — volume-weighted average, emphasizing price levels where actual depth was concentrated.

A bid that was consistently improving versus one that was stable then collapsed looks identical in OHLC but produces strikingly different TWAP trajectories.

Quote update frequency: the market maker's heartbeat

How many times the best bid/ask changes per interval is one of the most informative L1 metrics — and one of the least studied outside HFT firms.

Hasbrouck & Saar (2013) documented the rise of "low-latency trading" through quote update patterns, showing that high-frequency quoting activity contains predictive information about future price moves. The intuition:

  • Low update frequency → market makers are stable, comfortable with their inventory, confident in their fair-value estimate
  • High update frequency → market makers are aggressively adjusting, either because informed flow is arriving (the Glosten & Milgrom, 1985, adverse selection response) or because they're competing intensely for priority

The extreme case — quote update frequency spikes massively but price barely moves — can indicate quote stuffing: the potentially manipulative practice of flooding the book with rapid-fire quote updates to create artificial latency and confuse competing algorithms. Egginton, Van Ness & Van Ness (2016) documented this phenomenon and its effects on market quality.

The average update interval (time between consecutive quote changes) completes the picture. When this metric compresses during a session, the market is entering a high-information regime — market makers are processing new information faster.


References:

  • Stoikov, S. (2018). "The Micro-Price: A High-Frequency Estimator of Future Prices." Quantitative Finance, 18(12), 1959–1966.
  • Hasbrouck, J. & Saar, G. (2013). "Low-Latency Trading." Journal of Financial Markets, 16(4), 646–679.
  • Glosten, L.R. & Milgrom, P.R. (1985). "Bid, Ask and Transaction Prices in a Specialist Market with Heterogeneously Informed Traders." Journal of Financial Economics, 14(1), 71–100.
  • Egginton, J.F., Van Ness, B.F. & Van Ness, R.A. (2016). "Quote Stuffing." Financial Management, 45(3), 583–608.

Download the same month

No account needed. Pro adds every venue and perp, at 1-minute to daily bars.
# 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"

# Free preview — no API key required
aperiodic l1_price --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"

Questions

Related

L1 imbalanceBid against ask size at the touchL1 liquiditySpread and dollars at the touchL2 order book imbalanceBid against ask size, 5 to 25 levels deep
Aperiodic

Built from hundreds of terabytes of raw data and distilled into point-in-time metrics you can pull as parquet files. Plus the raw trades, quotes and derivatives data behind them.

Use Cases
  • Improve your backtest
  • Find new alpha
  • Execute smarter
Indices
  • All indices
  • Aperiodic Cost Index
  • Aperiodic Depth Index
  • Aperiodic Impact Index
Metrics
  • Metrics library
  • Data Catalog
  • Live markets dashboard
  • Global Liquidity
  • Unusual activity
  • Order Flow
  • L1 & L2
  • Derivatives
  • RWA
  • Raw Data
Developers
  • API Docs
  • Live WebSocket Feed
  • MCP Server
  • Notebooks
  • For AI Agents
  • Atlas Security Master
  • Pre-flight
  • Changelog
  • Roadmap
  • llms.txt
Learn
  • Replays
  • Microstructure Guide
  • Architecture
  • Research Blog
  • FAQ
Compare
  • All vendors
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
Company
  • Pricing
  • Contact
  • Book a call
  • Terms of Service
  • Privacy Policy
  • Licensing
  • SLA

© Copyright 2026 Aperiodic. All Rights Reserved.

Aperiodic Limited · Registered in Ireland · Company No. 815273 ·
136 Capel Street, Dublin D01 T2C9, Ireland

Shown: minute closes of 847 perpetuals, 20:30–22:30 UTC on 10 Oct 2025, IOTX in orange · built with ohlcv 1m