Aperiodic
DataAlpha
CatalogOrder FlowL1 & L2Derivatives & Market Data
Get Started

L1 — Top of Book

Millisecond-resolution best bid/ask analytics.

Top-of-book quote data distilled into interval aggregates: spread, depth, imbalance, mid-price dynamics, and update frequencies — enabling high-resolution microstructure research without raw tick storage.

L1 — Top of Book Datasets

L1 Price

Tier 2

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

Key fields

Mid PriceWeighted Mid PriceBid Price TWAPAsk Price VWAP

L1 Imbalance

Tier 3

Bid/ask imbalance, ratio, percentages — both instantaneous (last) and averaged over the interval.

Key fields

ImbalanceImbalance RatioBid/Ask RatioAvg Imbalance

L1 Liquidity

Tier 3

Spread (absolute and bps), depth, dollar depth — instantaneous and interval-averaged.

Key fields

Spread (bps)Total DepthTotal Dollar DepthAvg Spread (bps)

Highlighted Metrics

midprice

Mid Price

Mid Price is the center of the best bid and best ask, making it the cleanest instantaneous fair-value proxy at the top of book.

Because it strips out half-spread noise, it is widely used for microstructure research, marking, and short-horizon return calculations.

weighted_midprice

Weighted Mid Price

Weighted Mid Price tilts the simple midpoint by the relative size resting at the best bid and ask.

That gives it a predictive flavor because it incorporates which side of the top of book is showing more immediate depth.

quote_update_frequency

Quote Update Frequency

Quote Update Frequency measures how actively the top of book was refreshing during the interval.

A high reading often means the market was competitive, reactive, or unstable enough to force frequent repricing.

avg_update_interval

Avg Update Interval

Average Update Interval is the time counterpart to quote frequency, showing how quickly the best quotes changed on average.

Shorter intervals imply a faster and more responsive book, while longer intervals suggest a calmer or less actively managed top of book.

bid_price_vwap

Bid Price VWAP

Bid Price VWAP summarizes where the best bid spent its time with volume-sensitive weighting.

It offers a richer picture than a single snapshot because it reflects how quoted buying interest evolved across the bar.

imbalance

Imbalance

Imbalance measures the raw difference between bid-side and ask-side top-of-book size.

It is one of the fastest ways to see which side is presenting more immediate resting interest at the best quotes.

imbalance_ratio

Imbalance Ratio

Imbalance Ratio scales the raw difference into a relative measure that is easier to compare across symbols and market states.

Because it normalizes for total top-of-book size, it often gives a cleaner signal than the raw imbalance alone.

bid_ask_ratio

Bid/Ask Ratio

Bid/Ask Ratio directly compares the best-bid size with the best-ask size.

It is intuitive, portable, and useful when you want to know whether displayed buying depth materially outweighed displayed selling depth.

bid_percentage_avg

Avg Bid %

Average Bid % shows the mean share of top-level liquidity that sat on the bid across the interval.

This smooths through flicker and highlights the prevailing balance of displayed interest instead of a single instant.

ask_percentage_avg

Avg Ask %

Average Ask % is the complementary view, capturing how much of top-level liquidity tended to sit on the ask side.

Monitoring the bid and ask averages together helps reveal whether one side dominated persistently or whether the book spent the interval near equilibrium.

spread_bps

Spread (bps)

Spread in basis points measures the instantaneous cost of crossing from the best bid to the best ask on a normalized scale.

It is one of the most direct and actionable summaries of top-of-book trading conditions.

spread_depth_ratio

Spread/Depth Ratio

Spread/Depth Ratio combines price width and displayed size into a single liquidity efficiency measure.

A market with tight spreads but little size can still be fragile, and this ratio helps expose that weakness.

total_dollar_depth

Total Dollar Depth

Total Dollar Depth aggregates the top-level bid and ask liquidity in value terms.

This gives a more practical view of executable size than raw units, especially across instruments with different prices.

dollar_depth_bid_avg

Avg Bid Dollar Depth

Average Bid Dollar Depth tracks the mean value resting on the bid at the top of book throughout the interval.

It helps answer whether supportive displayed buying liquidity was consistently present or only flashed briefly.

dollar_depth_ask_avg

Avg Ask Dollar Depth

Average Ask Dollar Depth provides the matching view for displayed sell-side liquidity at the best offer.

Comparing it with the bid average helps reveal whether one side of the book was structurally thinner or thicker during the bar.

Market Microstructure Context

Spread and top-of-book liquidity

BID DEPTHASK DEPTHSPREAD

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.

  • Quoted spread — The gap between best ask and best bid. The sticker price of trading — what you see, not necessarily what you get once real size hits the book.
  • Spread in basis points — Price-normalized spread for cross-asset comparison. A 1-cent spread means something very different on a $10 asset versus a $50,000 one.
  • Top-of-book depth — How much size sits at the best prices. A 1 bps spread on 50k of depth is a different market than 1 bps on 500k. This tells you the cost of the first fill — not whether the market survives the second.
  • Spread/depth ratio — The honesty check on tight spreads. Low ratio means genuinely cheap liquidity. High ratio means the narrow quote is decorative — it will not survive contact with real flow.
Intro to Aperiodic L1 Price Metrics
Interactive notebook

Use Cases

Spread-based execution cost modelling

Use average and instantaneous spread metrics to quantify market-making costs and estimate fill quality across instruments.

Informed trader detection via imbalance

Detect directional pressure from bid/ask imbalance and imbalance ratio dynamics before price moves occur.

Quote update frequency analysis

Identify quote stuffing patterns and measure market-maker activity intensity using update frequency metrics.

VWAP/TWAP quote benchmarking

Compare execution fills against bid/ask VWAP and TWAP to measure adverse selection in your order flow.

High-frequency strategy feature engineering

Use weighted mid-price, imbalance averages, and depth to build predictive features for HFT and MM strategies.

Get started in minutes

pip install aperiodic
pypi ↗
example.py
from 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())

Use with AI Agents

Query L1 — Top of Book datasets programmatically with our Python SDK and REST API — built for autonomous research workflows.

Get Started

Sign up and subscribe to get an API key. Start querying datasets in minutes.

Ready to start building?

Get access to our full catalog of market microstructure data.

Get started free
Get started
Aperiodic

Institutional-Grade Order Flow, Liquidity & Derivative Metrics — Turn market microstructure into actionable signals, alpha and analytics in minutes.

© Copyright 2026 Aperiodic. All Rights Reserved.

Product
  • Data Catalog
  • Pricing
  • API Docs
  • Notebooks
  • Roadmap
  • Changelog
  • FAQ
  • For AI Agents
Metrics
  • Order Flow
  • L1 — Top of Book
  • L2 — Order Book
  • Market Data
  • Derivatives
Channels
  • Research Insights
  • Microstructure Guide
  • Telegram
  • Twitter/X
  • LinkedIn
Company
  • Contact
  • Book a call
  • Terms of Service
  • Privacy Policy
  • LLM? Read this.

NOT INVESTMENT ADVICE

The Content is for informational purposes only, you should not construe any such information or other material as legal tax, investment, financial, or other advice. Nothing contained on our presentation constitutes a solicitation, recommendation, endorsement, or offer by Aperiodic or any third party service provider to buy or sell any securities or other financial instruments in this or in in any other jurisdiction in which such solicitation or offer would be unlawful under the securities laws of such jurisdiction.

All Content on this presentation is information of a general nature and does not address the circumstances of any particular individual or entity. Nothing in the presentation constitutes professional and/or financial advice, nor does any information on the Presentation constitute a comprehensive or complete statement of the matters discussed or the law relating thereto.

Aperiodic is not a fiduciary by virtue of any person's use of or access to the Presentation or Content. You alone assume the sole responsibility of evaluating the merits and risks associated with the use of any information or other Content on the Presentation before making any decisions based on such information or other Content. In exchange for using the Presentation, you agree not to hold Aperiodic, its affiliates or any third party service provider liable for any possible claim for damages arising from any decision you make based on information or other Content made available to you through the Presentation.

INVESTMENT RISKS

There are risks associated with investing in securities. Investing in stocks, bonds, exchange traded funds, mutual funds, and money market funds involve risk of loss. Loss of principal is possible. Some high risk investments may use leverage, which will accentuate gains & losses. Foreign investing involves special risks, including a greater volatility and political, economic and currency risks and differences in accounting methods. A security's or a firm's past investment performance is not a guarantee or predictor of future investment performance.