Aperiodic
Metrics
MarketsLive
DocsPricing
Get the data
Exchange APIs · Binance

Binance futures order book history: every way to get it

Binance doesn’t serve order book history through its API: GET /fapi/v1/depth returns the book as it is right now, up to 1,000 levels. For the past you have four options. There are Binance’s own daily bookDepth files, which give depth in percentage bands every 30 seconds and start in 2023 for BTCUSDT. You can record the WebSocket stream yourself from today on. A raw archive such as Tardis.dev replays the full L2 book back to 2019. Or you can use per-bar book metrics like ours, back to 2020.

Endpoint limits from Binance’s API docs; archive files listed and opened on data.binance.vision, November 28, 2026. Binance’s docs remain the authority.

Every way to get it

  • REST snapshot, GET /fapi/v1/depth

    Price levels on both sides, up to 1,000

    How far back
    Now only
    Cost
    Free, no key
    The catch
    No history at all. A 1,000-level call costs 20 of your request weight.
  • Record the WebSocket yourself

    Every change to the book, every 100 ms, plus a snapshot to start from

    How far back
    From the day you start
    Cost
    Free, plus a machine that never sleeps
    The catch
    A dropped connection leaves a gap you have to detect and resync, and nothing before day one.
  • Binance bookDepth files (data.binance.vision)

    Cumulative depth and notional within ±0.2% to ±5% of the price, every ~30 seconds

    How far back
    BTCUSDT from January 1, 2023
    Cost
    Free for non-commercial use
    The catch
    Bands, not price levels. Four BTCUSDT days are missing.
  • Binance bookTicker files (data.binance.vision)

    Every change to the best bid and ask

    How far back
    BTCUSDT from May 16, 2023 to April 1, 2024
    Cost
    Free for non-commercial use
    The catch
    Nothing after the first hours of April 1, 2024, and one day is 88 MB zipped.
  • Binance historical order book program

    Tick-level L2 for whitelisted futures accounts, per Binance’s 2020 announcement

    How far back
    Unknown
    Cost
    Unknown
    The catch
    The page the announcement links to for applying returned 404 when we checked on November 28, 2026, and we found no current way to apply.
  • Tardis.dev

    The raw depth stream with periodic 1,000-level snapshots, to replay the full L2 book

    How far back
    USDⓈ-M futures from November 17, 2019
    Cost
    Paid plans
    The catch
    You rebuild the book and compute what you need from it yourself.
  • Aperiodic

    Per-bar book metrics: spread and top-of-book depth, depth and imbalance at 5 to 25 levels

    How far back
    Binance from January 1, 2020
    Cost
    Prime plan; a free preview with no key
    The catch
    Metrics per bar, from 1 minute to 1 day, not the raw levels.
WayWhat you getHow far backCostThe catch
REST snapshot, GET /fapi/v1/depthPrice levels on both sides, up to 1,000Now onlyFree, no keyNo history at all. A 1,000-level call costs 20 of your request weight.
Record the WebSocket yourselfEvery change to the book, every 100 ms, plus a snapshot to start fromFrom the day you startFree, plus a machine that never sleepsA dropped connection leaves a gap you have to detect and resync, and nothing before day one.
Binance bookDepth files (data.binance.vision)Cumulative depth and notional within ±0.2% to ±5% of the price, every ~30 secondsBTCUSDT from January 1, 2023Free for non-commercial useBands, not price levels. Four BTCUSDT days are missing.
Binance bookTicker files (data.binance.vision)Every change to the best bid and askBTCUSDT from May 16, 2023 to April 1, 2024Free for non-commercial useNothing after the first hours of April 1, 2024, and one day is 88 MB zipped.
Binance historical order book programTick-level L2 for whitelisted futures accounts, per Binance’s 2020 announcementUnknownUnknownThe page the announcement links to for applying returned 404 when we checked on November 28, 2026, and we found no current way to apply.
Tardis.devThe raw depth stream with periodic 1,000-level snapshots, to replay the full L2 bookUSDⓈ-M futures from November 17, 2019Paid plansYou rebuild the book and compute what you need from it yourself.
AperiodicPer-bar book metrics: spread and top-of-book depth, depth and imbalance at 5 to 25 levelsBinance from January 1, 2020Prime plan; a free preview with no keyMetrics per bar, from 1 minute to 1 day, not the raw levels.

The endpoints and their limits

Public market-data endpoints on Binance, no API key needed.
  • Order book

    GET /fapi/v1/depth
    How far back
    Now only
    Rows a call
    5, 10, 20, 50, 100, 500 or 1,000 levels
    Rate limit
    Weight 2 up to 50 levels, 5 for 100, 10 for 500, 20 for 1,000
    Returns
    Bids and asks, price and quantity per level
  • Best bid and ask

    GET /fapi/v1/ticker/bookTicker
    How far back
    Now only
    Rows a call
    One symbol, or all
    Rate limit
    Weight 2 for one symbol, 5 for all
    Returns
    Best price and quantity on each side
  • Diff depth stream

    <symbol>@depth@100ms (or @250ms, @500ms)
    How far back
    From when you connect
    Rows a call
    A stream, not a call
    Rate limit
    WebSocket connection limits
    Returns
    Changed levels since the last update, with update IDs
  • Book ticker stream

    <symbol>@bookTicker
    How far back
    From when you connect
    Rows a call
    A stream, not a call
    Rate limit
    WebSocket connection limits
    Returns
    Every change to the best bid and ask
EndpointReturnsRows a callHow far backRate limit
Order bookGET /fapi/v1/depthBids and asks, price and quantity per level5, 10, 20, 50, 100, 500 or 1,000 levelsNow onlyWeight 2 up to 50 levels, 5 for 100, 10 for 500, 20 for 1,000
Best bid and askGET /fapi/v1/ticker/bookTickerBest price and quantity on each sideOne symbol, or allNow onlyWeight 2 for one symbol, 5 for all
Diff depth stream<symbol>@depth@100ms (or @250ms, @500ms)Changed levels since the last update, with update IDsA stream, not a callFrom when you connectWebSocket connection limits
Book ticker stream<symbol>@bookTickerEvery change to the best bid and askA stream, not a callFrom when you connectWebSocket connection limits

What the limits mean for a backtest

Neither the REST endpoints nor the streams take a start time: what the book looked like yesterday is gone unless someone recorded it. So any backtest that fills orders against depth, or any study of how the book behaved in a sell-off, needs one of the archives below.

Binance also hides some liquidity from these responses: its docs say Retail Price Improvement (RPI) orders are excluded from /fapi/v1/depth and bookTicker, and a separate /fapi/v1/rpiDepth includes them.

Recording the book yourself

Binance’s documented way to keep a local book, as a recorder that keeps going. It saves a REST snapshot with its lastUpdateId, then every diff event after it, so the file can be replayed into the book at any moment. When an event’s pu does not match the previous event’s u, or the stream drops (Binance closes every connection after 24 hours), it takes a new snapshot and carries on.
example.py
import asyncio
import json

import httpx
import websockets

SYMBOL = "btcusdt"
STREAM = f"wss://fstream.binance.com/public/ws/{SYMBOL}@depth@100ms"
SNAPSHOT = "https://fapi.binance.com/fapi/v1/depth"


async def record(path: str) -> None:
    async with httpx.AsyncClient() as http:
        with open(path, "a") as out:
            while True:  # reconnect: Binance drops every stream after 24 hours
                try:
                    async with websockets.connect(STREAM) as ws:
                        await follow(ws, http, out)
                except (websockets.ConnectionClosed, OSError):
                    await asyncio.sleep(1)


async def follow(ws, http: httpx.AsyncClient, out) -> None:
    snapshot, prev_u = None, None
    async for message in ws:
        event = json.loads(message)
        if snapshot is None:  # (re)start: a snapshot after the stream is open
            snapshot = (await http.get(SNAPSHOT, params={"symbol": SYMBOL.upper(), "limit": 1000})).json()
            out.write(json.dumps({"snapshot": snapshot}) + "\n")
        last_id = snapshot["lastUpdateId"]
        if event["u"] < last_id:
            continue  # older than the snapshot
        if prev_u is None and event["U"] > last_id:
            snapshot = None  # missed the start: take a new snapshot
            continue
        if prev_u is not None and event["pu"] != prev_u:
            snapshot, prev_u = None, None  # gap in the stream: resync
            continue
        out.write(json.dumps({"event": event}) + "\n")  # prices stay strings
        prev_u = event["u"]


asyncio.run(record("btcusdt-depth.jsonl"))

Binance’s download archive

Binance publishes two order book files a day for USD-margined futures at data.binance.vision. bookDepth gives cumulative depth (in coins) and notional (in USDT) within 12 bands, ±0.2%, ±1%, ±2%, ±3%, ±4% and ±5% of the price, about every 30 seconds. The BTCUSDT file for November 27, 2026 has 2,880 snapshots and 34,560 rows. The archive lists 1,423 BTCUSDT days, from January 1, 2023 to November 27, 2026, with February 8 and 9, 2023, April 18, 2024 and October 8, 2026 missing. You see how much sits within 1% of the price, but not at which levels.

bookTicker records every change to the best bid and ask: 7.4 million rows on March 30, 2024 for BTCUSDT, 88 MB zipped. The BTCUSDT daily files run from May 16, 2023 to March 30, 2024. The last monthly file, for April 2024, holds only the first hours of April 1, and nothing comes after it.

Both are licensed CC BY-NC-SA 4.0. Binance’s data terms (last updated August 26, 2026) exclude commercial use and require a separate written enterprise licence for it.

If you need more history

We have the Binance futures book as per-bar metrics from January 1, 2020, including contracts that have since been delisted.

l1_liquidity gives the spread and the dollar depth at the best bid and ask. l2_liquidity gives the total quantity in the top 5, 10, 20 and 25 levels on each side, and l2_imbalance gives how the two sides compare at each depth. Each comes as the bar’s last value and its average, in bars from 1 minute to 1 day (15 and 30 seconds on Institutional), timestamped by the exchange or by when each update reached us. We never recalculate a bar after publishing it.

On Binance’s BTC perp in May 2025, the top 5 levels held a median 8.9 BTC per side and the top 25 levels about 10.9 BTC (10.84 on the ask, 10.87 on the bid), so four-fifths of the visible depth near the price sat in the first five levels. That month is the free preview, so you can check it with no key.

Datasets: l1_liquidity, l2_liquidity, l2_imbalance (pricing).

example.py
from datetime import date

from aperiodic import get_metrics

# Binance BTC perp, 5-minute bars, May 2025: the free preview, no key needed
book = get_metrics(
    metric="l2_liquidity",
    exchange="binance-futures",
    symbol="perpetual-BTC-USDT:USDT",
    interval="5m",
    timestamp="exchange",
    start_date=date(2025, 5, 1),
    end_date=date(2025, 5, 31),
    preview=True,
)

Questions

Can I get historical order book data from the Binance futures API?
No. GET /fapi/v1/depth and the depth streams only show the book as it is now; none of them takes a start time. History comes from Binance’s daily bookDepth files, from recording the stream yourself, or from a third-party archive.
What is in Binance’s futures bookDepth files?
Four columns: timestamp, percentage, depth and notional. Each snapshot, about every 30 seconds, has 12 rows: the cumulative depth and notional within ±0.2%, ±1%, ±2%, ±3%, ±4% and ±5% of the price. BTCUSDT files start on January 1, 2023, per the archive listing on November 28, 2026.
Does Binance still publish futures bookTicker files?
Not for BTCUSDT since April 2024. The daily bookTicker files on data.binance.vision run from May 16, 2023 to March 30, 2024, and the last monthly file covers the first hours of April 1, 2024, as listed on November 28, 2026.
How do I apply for Binance’s historical order book data?
Binance’s 2020 announcement says tick-level order book data needs a whitelisted futures account. The page it links to for applying returned 404 when we checked on November 28, 2026, and the endpoint is not in Binance’s current API docs, so we could not find a current way to apply.
Where can I get Binance futures order book history from before 2023?
Tardis.dev has the raw USDⓈ-M futures depth stream from November 17, 2019, to replay the full book. Aperiodic has per-bar book metrics (spread, depth and imbalance at 5 to 25 levels) for Binance futures from January 1, 2020.

Sources

  • Binance API docs: Order Book (/fapi/v1/depth)
  • Binance API docs: WebSocket market streams
  • Binance API docs: How to manage a local order book correctly
  • Binance public data: bookDepth files for BTCUSDT
  • Binance Vision terms of use (PDF)
  • Binance public data: terms and conditions
  • Binance blog: backtest with Binance historical data (2020)
  • Tardis.dev: Binance USDⓈ-M futures data details

Also: Binance open interest history API · OKX funding rate and open interest history API, measured · Aperiodic vs. Binance public data · order book depth, every venue · order book imbalance, every venue

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.

Product updates

New datasets, metrics and exchanges, as they ship.

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
  • For quants
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
  • Every exchange with stock perps
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
Tools
  • Trading cost calculator
  • Best time to trade crypto
Learn
  • Markets from First Principles
  • Microstructure Guide
  • Research
  • Replays
  • How it works
  • Architecture
  • Research Blog
  • FAQ
Company
  • Team
  • Contact
  • Book a call
  • Changelog
  • Roadmap
Compare
  • All vendors
  • Pricing compared
  • MCP servers compared
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
  • vs. Crypto Lake
  • vs. Laevitas
  • vs. Coinalyze
  • vs. 0xArchive
Exchange data
  • Binance archive
  • Hyperliquid data
  • Binance OI history API
  • OKX history APIs
  • Binance order book history

© 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