Aperiodic
Metrics
MarketsLive
DocsPricing
Get the data
Back to Catalog

Aperiodic Indices · Liquidity

Aperiodic Cost Index

The toll on every market order: the gap between the best bid and the best ask, in basis points of the mid.

See it on real data

Start in Claude
How it worksUsesCode
PriceCost14:05 UTC, 13 May14:00 UTC, 14 May

Shown: spread_bps on the BTC-USDT perp · Binance, 5-minute bars over the 24 hours to 14 May 2025, from the free preview.

Column
spread_bps in L1 Liquidity
Endpoint
/api/v1/data/l1_liquidity
Family
Liquidity · What will it cost to trade?
Unit
Basis points of the mid
Built from
L1 Liquidity →
Intervals
1m5m15m30m1h4h1d
Exchanges
binance-futuresokx-perpshyperliquid-perps
Plan
Prime and up · Pricing

How it works

  1. Best bid and best ask at each quote update.
  2. Ask minus bid, in basis points of the mid price.
  3. One value per bar; a contract’s index is the median of its last 24 hours of 5-minute bars.

What to use it for

Time your market orders
Cost moves through the day. Cross when it sits at the low end of its day, and work a limit order when it’s wide.
Charge real costs in a backtest
Charge each simulated market order half the spread at its bar, not a flat fee that flatters fast strategies.
Pick the venue
The same perp quotes a different spread on Binance, OKX and Hyperliquid. Compare Cost and route to the tightest.

Example Request

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

See what it answers

Aperiodic Cost Index's page reads it on real markets, with what to look for and how it is built.

Use with AI Agents

Pull spread_bps programmatically via our Python SDK and REST API, optimised for autonomous research workflows.

Get Started

Subscribe to get full API access. Start querying all datasets in minutes.

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