REST API

Trades Data

Trade data contains the public trades that each exchange publishes. The data includes timestamps, prices, quantities, and market direction. On most venues, each row is one execution. For exceptions, refer to the venue notes below.

Download Trade Data

Download the hourly trade data files for the trading pairs and exchanges that you select.

GET/download

Example: Download BTCUSDT Trades

Terminal
curl "https://api.cryptohftdata.com/v1/download?file=binance_spot/2025-08-01/20/BTCUSDT_trades.parquet&api_key=your-api-key-here" \
  -o BTCUSDT_trades_20.parquet

Venue-specific semantics

  • OKX: Before the 2026-09 data-integrity release, OKX trades come from the trades channel of the exchange. This channel aggregates fills. There is one row for each taker order at each price level. quantity is the sum of the sizes, and trade_id is the last fill ID of the aggregate. The traded volume is complete, but the row counts and sizes are not per fill. From the release, rows come from the trades-all channel, with one row for each fill. We plan a per-fill repair of about the last three months of history.
  • OKX perpetual swaps: Sizes are in contracts. Multiply each size by the contract value of the instrument (ctVal from the OKX instruments endpoint, in ctValCcy units). This unit is the base coin for linear swaps, for example BTC-USDT-SWAP. It is USD for inverse swaps, for example BTC-USD-SWAP. OKX spot sizes are already in the base coin.
  • Binance Spot: The spot trade stream does not contain an order type. Thus, order_type is always MARKET as a placeholder. Do not use this column. Use is_buyer_maker to find the aggressor side.
  • Bybit: After a reconnect, trades can include rows that we backfilled from the Bybit REST API. These rows use the same schema. We remove duplicates by trade ID. If the two copies exist, we keep the WebSocket copy.
  • Lighter: trade_id is one counter for the full exchange, and it is unique across markets. Sometimes Lighter sends a trade a second time, some seconds later. We publish only the first delivery (we corrected the history on 2026-09-30). The Lighter trade feed can also be late by seconds, and sometimes by minutes, on many markets at the same time. We put each row in the file for its arrival hour (received_time). Thus, a late trade can be in the file for the next hour. If you need a complete window, filter on trade_time and also load the next hour.
  • Hyperliquid: Before the 2026-09 data-integrity release, a trade that the exchange replayed after a reconnect could go again into the file of a later hour. This also occurred for trades from much earlier. Remove duplicates from the history on (symbol, trade_id, trade_time). The Hyperliquid tid is unique only together with the coin and the time. We plan a repair of the published history. From the release, we do not publish replayed trades again.
  • 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.

If you cannot find the information that you need, tell us. We also help with integrations.

Contact support