Order Book Data
Order book data contains L2 depth information. It shows the bid and ask levels with their prices and quantities. Each file contains one hour of order book snapshots and updates.
Download Order Book Data
Download the hourly order book data files for the trading pairs and exchanges that you select.
GET
https://api.cryptohftdata.com/v1/downloadRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | string | Yes | File path in this pattern: {exchange}/{date}/{hour}/{symbol}_orderbook.parquet |
| api_key | string | No | Optional. Do not send it if you use the free tier (60 requests/minute). Send an API key if you do not use JWT authentication. |
Example: Download BTCUSDT Order Book
Terminal
curl "https://api.cryptohftdata.com/v1/download?file=binance_spot/2025-08-01/20/BTCUSDT_orderbook.parquet&api_key=your-api-key-here" \
-o BTCUSDT_orderbook_20.parquetVenue-specific semantics
- Kraken Spot: The Kraken spot order book feed keeps a window of 1,000 levels on each side. It does not delete levels that move out of the window. From the 2026-09 data-integrity release, we publish these levels as delete rows. Thus, a plain replay stays within 1,000 levels on each side. For earlier files, keep only the best 1,000 levels on each side after each update.
- Hour-start snapshots: Binance (spot and futures), Aster, OKX, Bybit, Bitget, Lighter, Kraken Futures and Hyperliquid files can start with a checkpoint snapshot of the order book at the hour boundary. Kraken spot and BitMEX files do not. We write a checkpoint only when we can prove that the order book is current. Thus, some hours start without one. In that case, continue from the order book of the previous hour, or wait for the next snapshot in the file.
- Binance, Aster: From 2026-09-30, collectors that we started or restarted with the updated version publish each accepted REST depth snapshot one time. Older files can contain identical consecutive copies of the same snapshot (on Binance, one copy can have
received_time=event_time× 1e6). These identical copies do not change the reconstructed order book. We do not plan an archive-wide cleanup, because the impact is low. Replay the files in their published message order with the native sequence IDs, and do not sort only byevent_time. Duplicate copies can change snapshot counts and the analysis of receipt times. - Lighter: From the 2026-09 data-integrity release,
final_update_idis the Lighternonce, andprev_final_update_idis the Lighterbegin_nonce. Theprev_final_update_idof each update is equal to thefinal_update_idof the previous update. A snapshot starts a new chain. Thus, a mismatch is a gap.last_update_idcontains theoffsetof the API server, which puts messages in order but is not contiguous. In earlier files,final_update_idandlast_update_idboth contain theoffset, andprev_final_update_idis empty. Theoffsetstarts again when a reconnect goes to a different Lighter server. Thus, a lower value after a reconnect is normal, and you cannot find gaps. Treat a crossed order book as not valid, and continue from the next snapshot. - OKX perpetual swaps: Sizes are in contracts. Multiply each size by the contract value of the instrument (
ctValfrom the OKX instruments endpoint, inctValCcyunits). This unit is the base coin for linear swaps, for exampleBTC-USDT-SWAP. It is USD for inverse swaps, for exampleBTC-USD-SWAP. OKX spot sizes are already in the base coin. - BitMEX: Quantities are in raw units that are different for each instrument: XBTUSD in USD contracts, XBTUSDT in 1e-6 BTC, ETHUSDT in 1e-5 ETH, and spot pairs in 1e-8 of the base asset. Before you compare with other venues, check the multiplier of the instrument.
For missing hours, partial periods and pending corrections to published history, refer to Known Gaps & Corrections.