Aperiodic
Metrics
MarketsLive
DocsPricing
Get the data
/

Get started

  • Overview
    • Authentication
    • Quickstart
    • Datasets
  • History over REST
  • Live over WebSocket

Datasets

Each with its history over REST and its live channel

Reference

  • MetadataREST
  • Raw dataREST

Download the spec

OpenAPIRESTAsyncAPIWS
Overview
Get started

API Documentation

Point-in-time market microstructure metrics over one API key: pull history as Parquet files over REST, or stream every new row over WebSocket. Every dataset has both, under the same name and with the same fields.
History · REST
/api/v1
Live · WebSocket
wss://stream.aperiodic.io/v1/stream
Auth
X-API-KEY header
Version
1.7.0
Get an API keyIntegrate with ClaudeDownload the spec:OpenAPI (REST)AsyncAPI (WebSocket)

Authentication

One key for both. Send it in the X-API-KEY header on every REST request and on the WebSocket handshake. Browsers can't set headers on a WebSocket, so stream from a server, a notebook or a script.

Sign up to get your key. Until then, the free preview answers to the shared DEMO-KEY, which the examples below use.

Quickstart

A month of candles over REST, then the same candles live as each bar closes. The history call runs as it is, on the free preview.

History over REST

# 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 ohlcv --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"

Live over WebSocket

pip install "aperiodic[stream]"
pypi ↗
import os

from aperiodic import stream

for message in stream(
    api_key=os.environ["APERIODIC_API_KEY"],
    dataset="ohlcv",
    exchange="binance-futures",
    interval="1m",
    symbols=["perpetual-BTC-USDT:USDT"],  # omit for every symbol on your plan
):
    print(message.channel, message.snapshot, message.data)

Next: parameters, files and errors for history, and connecting, replay and limits for the live feed.

Datasets

Each dataset's page has its fields, its REST endpoint with a Try it panel, and its live channel.

Trades

  • Flow MetricsDirectional order flow split by taker buy vs. sell, broken into small/medium/large notional segments, with a flow toxicity score.flow
  • Trade SizeTrade notional split into small (< $100), medium ($100–$1,000), and large (≥ $1,000) segments, with summary statistics for individual trade sizes.trade_size
  • Price Range & DistributionIntrabar high-low price range and full distribution statistics (mean, median, std, skewness, kurtosis) for trade prices within each interval.range
  • Impact MetricsHow much each unit of trading volume moves the price, measured via Amihud illiquidity, Kyle lambda, impact per notional, and large-trade reversal.impact
  • Up / Down Tick MetricsUptick and downtick count, volume, ratios and percentages based on price movement direction.updownticks
  • Trade Run StructureConsecutive same-direction trade run lengths, imbalance, flip rate, and price change on direction flip.run_structure
  • Returns & VolatilityLog-return based metrics: variance, realized volatility, bipower variation, jump ratio, autocorrelation, and trendiness.returns
  • SlippageHow much each trade pays above the best ask (buys) or receives below the best bid (sells) relative to the prevailing quote, aggregated per interval.slippage

Derivatives

  • BasisPerpetual futures mark price premium over index price (basis) and last trade price, in absolute and basis-point terms.basis
  • FundingFunding rate and update frequencies for perpetual futures contracts.funding
  • Open InterestOpen interest values with percentage change, volatility, and OI/price change ratio.open_interest
  • Derivative PriceSnapshot of mark, index, and last trade prices with interval percentage changes and pairwise divergence ratios.derivative_price

Market Data

  • CandlesticksOpen, High, Low, Close, Volume candlestick data with notional volume.ohlcv
  • VWAP / TWAPVolume-weighted and time-weighted average prices for precise execution benchmarks.vtwap

L1 (Top of Book)

  • L1 PriceBest bid and ask prices with quantities, midprice, quantity-weighted midprice, time/volume-weighted averages, and quote update frequency.l1_price
  • L1 ImbalanceBid/ask imbalance, ratio, percentages — both instantaneous (last) and averaged over the interval.l1_imbalance
  • L1 LiquiditySpread (absolute and bps), depth, dollar depth — instantaneous and interval-averaged.l1_liquidity

L2 (Order Book)

  • L2 Order Book ImbalanceMulti-depth (5, 10, 20, 25 levels) order book imbalance, ratio, and averages.l2_imbalance
  • L2 Order Book LiquidityTotal bid/ask depth aggregated over 5, 10, 20, 25 order book levels — instantaneous and interval-averaged.l2_liquidity

Indices

  • Flow IndicesTwo bounded reads of taker flow: conviction, the time-decayed share of recent bars one side won, and flow pressure, the net aggressor share of the bar.flow_indices
  • PositioningWhether positions are building or unwinding beyond what price explains, how large open interest is against daily trading, and the funding paid on new positions.positioning
NextHistory over REST
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.

Data
  • Metrics library
  • Order Flow
  • L1 & L2
  • Derivatives
  • Raw Data
  • Data Catalog
  • Free data
  • Pricing
Use Cases
  • Improve your backtest
  • Find new alpha
  • Execute smarter
Indices
  • All indices
  • Flow indices
  • Pressure Index
  • Conviction Index
  • Positioning indices
  • OI Divergence Index
  • Leverage Index
  • Crowding Index
  • Liquidity indices
  • Cost Index
  • Depth Index
  • Impact Index
Tokenized markets
  • All real-world assets
  • Commodity perps
  • Tokenized stock perps
  • Stock index perps
  • Tokenized ETF perps
  • Pre-IPO perps
  • FX perps
  • Hyperliquid HIP-3
Live markets
  • Live markets dashboard
  • Every perp, A–Z
  • Real-world asset board
  • Global Liquidity
  • Unusual activity
  • Live funding rates
Developers
  • Docs
  • API Docs
  • MCP Server
  • For AI Agents
  • Pre-flight
  • Notebooks
  • Integrations
  • Atlas Security Master
  • TParquet
  • llms.txt
Learn
  • Markets from First Principles
  • Microstructure Guide
  • Replays
  • Architecture
  • Research Blog
  • FAQ
Company
  • Team
  • Contact
  • Book a call
  • Changelog
  • Roadmap
Compare
  • All vendors
  • Pricing compared
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
  • vs. Crypto Lake
  • vs. Laevitas
  • vs. Coinalyze
Exchange data
  • Binance archive
  • Hyperliquid data
  • Binance OI history API
  • OKX history APIs

© Copyright 2026 Aperiodic. All Rights Reserved.

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