klines-okx / README.md
rogerdehe's picture
initial dataset card (under construction)
9fc9efe verified
|
Raw
History Blame Contribute Delete
2.13 kB
metadata
license: mit
task_categories:
  - time-series-forecasting
language:
  - en
tags:
  - crypto
  - cryptocurrency
  - finance
  - ohlcv
  - klines
  - okx
  - futures
  - perpetual
  - trading
pretty_name: OKX USDT Perpetual OHLCV Klines
size_categories:
  - 1B<n<10B

OKX USDT Perpetual OHLCV Klines

Historical OHLCV candlestick (kline) data for OKX USDT-margined perpetual futures, stored as zstd-compressed Parquet. Includes delisted symbols where available, for point-in-time / survivorship-bias-free backtests.

⚠️ Under construction. This dataset is being actively built and is currently partial — light timeframes (15m · 1h · 4h · 1d) are being backfilled across the full ~408-pair universe, with 5m/3m and 1m still to come. Pair and timeframe coverage will grow. A per-file COVERAGE.md will follow once settled.

Coverage (in progress)

futures (USDT perp)
Pairs building toward ~408 (incl. delisted)
Timeframes 15m · 1h · 4h · 1d being filled first; 5m · 3m · 1m coming
History from each contract's listing (mostly 2020–2021 onward) → present
Extras mark price and funding_rate series for many pairs

File layout

futures/{timeframe}/{PAIR}.parquet

Examples:

  • futures/1d/BTC_USDT_USDT.parquet
  • futures/1h/BTC_USDT_USDT-mark.parquet (mark price)
  • futures/8h/BTC_USDT_USDT-funding_rate.parquet (funding rate)

Pairs are BASE_USDT_USDT (USDT-margined perpetual). Each OHLCV Parquet has columns date (UTC candle open), open, high, low, close, volume.

Usage

from huggingface_hub import hf_hub_download
import pandas as pd

path = hf_hub_download("rogerdehe/klines-okx",
                       "futures/1d/BTC_USDT_USDT.parquet", repo_type="dataset")
df = pd.read_parquet(path)

Notes

  • Timestamps are UTC. Coverage varies per pair; this dataset is still filling in.
  • The HF dataset viewer is disabled (custom per-pair layout); load files directly.
  • Data provided as-is for research; no warranty of accuracy or completeness.