timestamp timestamp[ns]date 2026-03-12 00:00:00 2026-09-13 23:00:00 ⌀ | inst_id large_stringclasses 40
values | funding_rate float64 -0.01 0.01 ⌀ |
|---|---|---|
2026-03-12T00:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-12T08:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-12T16:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-13T00:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-13T08:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-13T16:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-14T00:00:00 | AAPL-USDT-SWAP | -0.000037 |
2026-03-14T08:00:00 | AAPL-USDT-SWAP | -0.00099 |
2026-03-14T16:00:00 | AAPL-USDT-SWAP | -0.000707 |
2026-03-15T00:00:00 | AAPL-USDT-SWAP | -0.001215 |
2026-03-15T08:00:00 | AAPL-USDT-SWAP | -0.001085 |
2026-03-15T16:00:00 | AAPL-USDT-SWAP | -0.001289 |
2026-03-16T00:00:00 | AAPL-USDT-SWAP | -0.000875 |
2026-03-16T08:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-16T16:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-17T00:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-17T08:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-17T16:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-18T00:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-18T08:00:00 | AAPL-USDT-SWAP | 0.0001 |
2026-03-18T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-19T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-19T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-19T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-20T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-20T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-20T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-21T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-21T08:00:00 | AAPL-USDT-SWAP | -0.000472 |
2026-03-21T16:00:00 | AAPL-USDT-SWAP | -0.000148 |
2026-03-22T00:00:00 | AAPL-USDT-SWAP | -0.000488 |
2026-03-22T08:00:00 | AAPL-USDT-SWAP | -0.000224 |
2026-03-22T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-23T00:00:00 | AAPL-USDT-SWAP | -0.001055 |
2026-03-23T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-23T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-24T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-24T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-24T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-25T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-25T08:00:00 | AAPL-USDT-SWAP | 0.00014 |
2026-03-25T16:00:00 | AAPL-USDT-SWAP | 0.00007 |
2026-03-26T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-26T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-26T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-27T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-27T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-27T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-28T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-28T08:00:00 | AAPL-USDT-SWAP | -0.000224 |
2026-03-28T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-29T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-29T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-29T16:00:00 | AAPL-USDT-SWAP | -0.000209 |
2026-03-30T00:00:00 | AAPL-USDT-SWAP | -0.000159 |
2026-03-30T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-30T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-31T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-31T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-03-31T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-01T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-01T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-01T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-02T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-02T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-02T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-03T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-03T08:00:00 | AAPL-USDT-SWAP | -0.000294 |
2026-04-03T16:00:00 | AAPL-USDT-SWAP | -0.000378 |
2026-04-04T00:00:00 | AAPL-USDT-SWAP | -0.000405 |
2026-04-04T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-04T16:00:00 | AAPL-USDT-SWAP | -0.000621 |
2026-04-05T00:00:00 | AAPL-USDT-SWAP | -0.000893 |
2026-04-05T08:00:00 | AAPL-USDT-SWAP | -0.000426 |
2026-04-05T16:00:00 | AAPL-USDT-SWAP | -0.00059 |
2026-04-06T00:00:00 | AAPL-USDT-SWAP | -0.000356 |
2026-04-06T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-06T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-07T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-07T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-07T16:00:00 | AAPL-USDT-SWAP | 0.000523 |
2026-04-08T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-08T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-08T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-09T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-09T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-09T16:00:00 | AAPL-USDT-SWAP | 0.000004 |
2026-04-10T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-10T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-10T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-11T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-11T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-11T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-12T00:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-12T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-12T16:00:00 | AAPL-USDT-SWAP | -0.000374 |
2026-04-13T00:00:00 | AAPL-USDT-SWAP | -0.00048 |
2026-04-13T08:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-13T16:00:00 | AAPL-USDT-SWAP | 0 |
2026-04-14T00:00:00 | AAPL-USDT-SWAP | 0 |
okx-multi-asset-1h (v2026.09)
Hourly market data for 40 OKX USDT-margined perpetual swaps across asset classes (21 equity, 15 crypto, 4 commodity), on one common hourly grid, for portfolio management research with TorchTrade.
Coverage
| First bar | 2026-03-12 00:00 UTC |
| Last bar | 2026-09-13 23:00 UTC (covers the hour until 2026-09-14 00:00) |
| Length | 186 days, 4,464 hourly bars per instrument |
| Rows | 178,560 bars (40 x 4,464), 22,893 funding settlements |
| Source | OKX public REST API and OKX monthly historical-data archives |
Every instrument has every hour in this window. The start is fixed by the most recently listed instruments (AMD-USDT-SWAP, EWY-USDT-SWAP, ORCL-USDT-SWAP, TSM-USDT-SWAP, listed on OKX 2026-03-11; see listed on OKX below): there is no earlier data for them anywhere on OKX. Most other instruments have longer histories on OKX (BTC and ETH perps hourly bars back to 2019-12).
Features
ohlcv_1h.parquet, one row per instrument and hour, sorted by inst_id, timestamp:
| Column | Type | Meaning |
|---|---|---|
timestamp |
datetime64[ns] | Bar open time in UTC (timezone-naive). The bar covers [timestamp, timestamp + 1h). |
inst_id |
string | OKX instrument id, e.g. BTC-USDT-SWAP, AAPL-USDT-SWAP, XAU-USDT-SWAP. |
open, high, low, close |
float64 | Last-traded price in USDT per unit of the underlying (one coin, one share, one troy ounce of gold, ...). |
volume |
float64 | Traded amount in units of the underlying (contracts x contract size). |
quote_volume |
float64 | Traded notional in USDT. |
mark_close |
float64 | OKX mark price at the end of the hour. OKX computes unrealized PnL and liquidations from the mark price, not the last trade. |
funding.parquet, one row per funding settlement:
| Column | Type | Meaning |
|---|---|---|
timestamp |
datetime64[ns] | Settlement time in UTC. |
inst_id |
string | OKX instrument id. |
funding_rate |
float64 | Rate for that settlement as a decimal. Payment = position notional x rate; longs pay shorts when positive. |
instruments.parquet, one row per instrument, snapshot at build time (not point-in-time):
inst_id, inst_type, asset_class (crypto / equity / commodity), base, list_time,
ct_val (contract size), max_leverage, tick_size, lot_size, min_size, rule_type.
quality.csv: the validation statistics behind the guarantees below, one row per instrument.
No derived features (returns, indicators, normalisation) are included; compute them from the raw columns so that you control lookback and point-in-time correctness.
Guarantees
Every instrument has every hourly bar in the window, with a mark price, no duplicates, no NaN, no non-positive prices, and consistent OHLC. Nothing was filled, interpolated or adjusted: the build refuses to write the dataset otherwise. Funding merges OKX's monthly archives with the REST history, and the build checks that both agree wherever they overlap.
Caveats
- Weekends: equity and commodity perps trade 24/7 on OKX. Bars while the underlying market is closed are OKX-internal price discovery, usually with thin volume.
- Short history: equity perps listed in 2026-02/03, so this is an evaluation and benchmark set more than a large training set.
- No-trade hours: some equity perps have hours with zero volume (flat OHLC equal to the previous
close), mostly on weekends and in the first weeks after listing. Such a bar means no trade, not
missing data. See
flat_zero_volume_barsinquality.csv. - Funding intervals vary: most instruments settle every 8h, but OKX changes intervals per
instrument (e.g. HYPE 4h to 8h, CL 8h to 4h in 2026-04). Apply funding at the settlement
timestamps in
funding.parquetinstead of assuming a fixed interval. - Universe selection uses end-of-window information. The instruments were selected at the
end of the window (2026-09-14 for
v2026.09): listed before the start, median daily quote volume of at least $1M over the last 90 days; all qualifying equities and commodities, plus the 15 highest-volume crypto perps with at least one year of history. Liquidity correlates with past performance, so this favours assets that did well during the window (see Jiang et al. 2017, §3.1). Forv2026.09, applying the same rule with only the first 30 days (2026-03-12 to 2026-04-10) selects 20 of the same 40 instruments: all 4 commodities, 10 of the 15 crypto perps (BCH, FIL, ONT, TAO and TRUMP instead of AAVE, LINK, NEAR, UNI and WLD), and 6 of the 21 equities (COIN, CRCL, HOOD, MSTR, NVDA, TSLA); most equity perps traded less than $1M a day in the weeks after listing. Instruments delisted before the scan are missing from both selections (survivorship). For backtests, split chronologically and report that the universe was chosen with information from the end of the window. - Corporate actions: prices are as traded. Several equity perps outside this universe (KORU, MUU, SPCX) show unadjusted 12-25x price breaks; the worst-hour column below lets you check that no instrument here has one.
Usage
import pandas as pd
from huggingface_hub import hf_hub_download
from okx_data.resample import resample_ohlcv
path = hf_hub_download("Torch-Trade/okx-multi-asset-1h", "ohlcv_1h.parquet", repo_type="dataset",
revision="v2026.09") # pin a version; omit for the latest
bars = pd.read_parquet(path)
bars_4h = resample_ohlcv(bars, "4h") # buckets 00:00, 04:00, ... UTC
bars_1d = resample_ohlcv(bars, "1D") # any rule that divides a day works
close = bars.pivot(index="timestamp", columns="inst_id", values="close")
resample_ohlcv is in the TorchTrade portfolio-management repo; it takes first/max/min/last for
open/high/low/close (and last for mark_close), sums volumes, and drops incomplete buckets.
Versions and getting more data
Each release is a git tag of this dataset named after the month of its last bar (vYYYY.MM).
This is version v2026.09; older versions stay loadable with revision=<tag>, so
results can always be reproduced.
The dataset is built by scripts/build_cross_asset_dataset.py in the TorchTrade
portfolio-management repo, from free public OKX endpoints (no API key).
- Newer data, same universe: rerun with a later end date, e.g.
uv run python scripts/build_cross_asset_dataset.py --end 2026-12-01, and publish the result as a new tag (v2026.11) of this dataset. - Earlier data: not possible for the equity and commodity perps (they did not exist before their listing date). A crypto-only dataset can start as early as each coin's OKX history.
- More instruments: OKX lists new perps regularly.
scripts/scan_universe.pyscans all live USDT instruments and reports history depth, liquidity and correlation; add qualifying names to the instrument lists at the top of the build script. - Finer resolution: 1-minute candles and tick-level trades are available from OKX's monthly
archives (
/api/v5/public/market-data-history, modules 2 and 1). - Delisting: if an instrument is delisted the build stops with an error rather than silently shrinking the universe.
Instruments
| instrument | class | listed on OKX | max leverage | mean $vol/day | ann vol | worst hour (log ret, mark) | max |close/mark-1| | funding interval h |
|---|---|---|---|---|---|---|---|---|
| CL-USDT-SWAP | commodity | 2026-03-04 | 50 | 101,295,912 | 0.65 | 2026-04-07 22:00 (-0.095, -0.095) | 0.0034 | 4,8 |
| NG-USDT-SWAP | commodity | 2026-03-10 | 50 | 2,057,911 | 0.44 | 2026-03-20 21:00 (-0.060, -0.060) | 0.0027 | 8 |
| XAG-USDT-SWAP | commodity | 2026-01-28 | 50 | 64,115,473 | 0.53 | 2026-03-23 11:00 (+0.048, +0.049) | 0.0017 | 8 |
| XAU-USDT-SWAP | commodity | 2025-04-09 | 100 | 250,101,947 | 0.26 | 2026-03-23 00:00 (-0.023, -0.023) | 0.0011 | 8 |
| AAVE-USDT-SWAP | crypto | 2020-12-10 | 50 | 33,876,470 | 0.79 | 2026-06-25 13:00 (-0.067, -0.065) | 0.0013 | 8 |
| ADA-USDT-SWAP | crypto | 2020-02-28 | 50 | 55,235,753 | 0.72 | 2026-08-22 05:00 (-0.089, -0.089) | 0.0022 | 8 |
| BNB-USDT-SWAP | crypto | 2022-12-23 | 50 | 60,907,099 | 0.40 | 2026-06-25 13:00 (-0.038, -0.038) | 0.0007 | 8 |
| BTC-USDT-SWAP | crypto | 2019-11-12 | 100 | 6,027,149,788 | 0.39 | 2026-06-25 13:00 (-0.049, -0.049) | 0.0009 | 8 |
| DOGE-USDT-SWAP | crypto | 2020-04-21 | 50 | 351,286,390 | 0.60 | 2026-08-22 05:00 (-0.070, -0.071) | 0.0008 | 8 |
| ETH-USDT-SWAP | crypto | 2019-11-12 | 100 | 7,148,512,457 | 0.53 | 2026-06-25 13:00 (-0.062, -0.062) | 0.0009 | 8 |
| HYPE-USDT-SWAP | crypto | 2025-02-21 | 50 | 289,460,759 | 0.84 | 2026-08-19 19:00 (+0.121, +0.122) | 0.0018 | 4,8 |
| LINK-USDT-SWAP | crypto | 2020-02-28 | 50 | 37,704,884 | 0.60 | 2026-06-25 13:00 (-0.058, -0.058) | 0.0011 | 8 |
| NEAR-USDT-SWAP | crypto | 2020-12-21 | 50 | 50,970,729 | 0.97 | 2026-08-22 05:00 (-0.080, -0.079) | 0.0021 | 8 |
| PEPE-USDT-SWAP | crypto | 2023-05-03 | 50 | 129,821,460 | 0.79 | 2026-08-20 08:00 (+0.071, +0.072) | 0.0021 | 8 |
| SOL-USDT-SWAP | crypto | 2021-01-22 | 100 | 742,861,035 | 0.57 | 2026-06-25 13:00 (-0.061, -0.061) | 0.0009 | 8 |
| SUI-USDT-SWAP | crypto | 2023-05-05 | 50 | 70,328,199 | 0.74 | 2026-08-22 05:00 (-0.106, -0.107) | 0.0011 | 8 |
| UNI-USDT-SWAP | crypto | 2020-09-17 | 50 | 42,600,816 | 0.86 | 2026-06-17 11:00 (-0.088, -0.087) | 0.0018 | 8 |
| WLD-USDT-SWAP | crypto | 2023-07-24 | 50 | 119,825,982 | 1.24 | 2026-06-05 02:00 (-0.120, -0.118) | 0.0024 | 8 |
| XRP-USDT-SWAP | crypto | 2019-11-12 | 100 | 243,665,247 | 0.57 | 2026-08-22 05:00 (-0.084, -0.085) | 0.0018 | 8 |
| AAPL-USDT-SWAP | equity | 2026-03-04 | 20 | 5,208,707 | 0.29 | 2026-07-30 20:00 (-0.048, -0.046) | 0.0056 | 8 |
| AMD-USDT-SWAP | equity | 2026-03-11 | 25 | 7,360,822 | 0.70 | 2026-08-04 20:00 (-0.093, -0.082) | 0.0114 | 8 |
| AMZN-USDT-SWAP | equity | 2026-02-26 | 20 | 2,114,117 | 0.35 | 2026-07-30 20:00 (+0.075, +0.077) | 0.0032 | 8 |
| COIN-USDT-SWAP | equity | 2026-02-26 | 20 | 2,847,041 | 0.72 | 2026-07-31 13:00 (-0.072, -0.072) | 0.0028 | 8 |
| CRCL-USDT-SWAP | equity | 2026-02-26 | 25 | 22,767,462 | 0.94 | 2026-03-24 14:00 (-0.098, -0.099) | 0.0022 | 8 |
| EWY-USDT-SWAP | equity | 2026-03-11 | 50 | 8,061,809 | 0.68 | 2026-07-29 19:00 (-0.061, -0.062) | 0.0063 | 8 |
| GOOGL-USDT-SWAP | equity | 2026-03-04 | 50 | 4,550,626 | 0.33 | 2026-04-29 20:00 (+0.054, +0.054) | 0.0043 | 8 |
| HOOD-USDT-SWAP | equity | 2026-02-25 | 20 | 2,446,941 | 0.73 | 2026-06-10 13:00 (+0.091, +0.091) | 0.0028 | 8 |
| INTC-USDT-SWAP | equity | 2026-02-26 | 25 | 24,647,592 | 0.87 | 2026-04-23 20:00 (+0.142, +0.143) | 0.0019 | 8 |
| META-USDT-SWAP | equity | 2026-03-04 | 20 | 2,413,786 | 0.42 | 2026-07-29 20:00 (-0.088, -0.090) | 0.0047 | 8 |
| MSFT-USDT-SWAP | equity | 2026-03-04 | 20 | 2,927,704 | 0.33 | 2026-07-29 22:00 (+0.055, +0.054) | 0.0055 | 8 |
| MSTR-USDT-SWAP | equity | 2026-02-25 | 25 | 14,415,617 | 0.81 | 2026-06-25 13:00 (-0.098, -0.098) | 0.0024 | 8 |
| MU-USDT-SWAP | equity | 2026-03-04 | 50 | 160,295,417 | 0.91 | 2026-06-24 20:00 (+0.135, +0.136) | 0.0063 | 8 |
| NVDA-USDT-SWAP | equity | 2026-03-04 | 50 | 13,839,853 | 0.38 | 2026-06-25 13:00 (-0.049, -0.049) | 0.0011 | 8 |
| ORCL-USDT-SWAP | equity | 2026-03-11 | 20 | 3,902,996 | 0.62 | 2026-06-10 20:00 (-0.082, -0.076) | 0.0045 | 8 |
| PLTR-USDT-SWAP | equity | 2026-02-26 | 20 | 2,043,745 | 0.58 | 2026-08-03 20:00 (+0.111, +0.112) | 0.0015 | 8 |
| QQQ-USDT-SWAP | equity | 2026-03-04 | 25 | 9,851,858 | 0.22 | 2026-06-25 13:00 (-0.030, -0.030) | 0.0026 | 8 |
| SNDK-USDT-SWAP | equity | 2026-03-04 | 75 | 530,492,302 | 1.09 | 2026-07-30 13:00 (+0.110, +0.110) | 0.0043 | 8 |
| SPY-USDT-SWAP | equity | 2026-03-04 | 50 | 1,855,356 | 0.15 | 2026-03-23 11:00 (+0.021, +0.019) | 0.0025 | 8 |
| TSLA-USDT-SWAP | equity | 2026-02-25 | 25 | 11,460,693 | 0.44 | 2026-07-23 13:00 (-0.056, -0.056) | 0.0013 | 8 |
| TSM-USDT-SWAP | equity | 2026-03-11 | 20 | 2,142,080 | 0.45 | 2026-06-25 13:00 (-0.050, -0.050) | 0.0024 | 8 |
- Downloads last month
- 139