OKX Funding Rate Dataset

OKX Historical Funding Rate Data

OKX funding rates, mark prices, and index prices packaged as hourly files for carry, basis, and risk research.

No credit card · The sample is one real hourly Parquet file and needs no API key

Sample

See the data before you sign up

The first rows of one real hour: BTC-USDT-SWAP on OKX Futures, 2026-09-02 at 12:00 UTC. One row per mark price update.

okx_futures/2026-09-02/12/BTC-USDT-SWAP_mark_price.parquetDownload full file
received_timeevent_timesymbolmark_priceindex_priceestimated_settle_pricefunding_ratenext_funding_time
17883504224200649591788364800000BTC-USDT-SWAPnullnullnull0.00010000000000001788364800000
17883504870146550281788364800000BTC-USDT-SWAPnullnullnull0.00010000000000001788364800000
17883505349734908781788364800000BTC-USDT-SWAPnullnullnull0.00010000000000001788364800000
17883506029791028541788364800000BTC-USDT-SWAPnullnullnull0.00010000000000001788364800000
17883506512305676421788364800000BTC-USDT-SWAPnullnullnull0.00010000000000001788364800000
17883507071928823661788364800000BTC-USDT-SWAPnullnullnull0.00010000000000001788364800000
Showing 6 of 17,982 rows in this hourTimestamps are raw integers; units are in the schema below

Wire format

From exchange message to Parquet row

Every row starts as a message on the exchange's WebSocket or REST API. Point at a line or a column to see where each value comes from and how we convert it. Our test suite replays these messages through the production pipeline, so the rows shown are the rows you download.

OKX Futures

OKX sends this message every 200 ms when the mark price changes. If the mark price does not change, OKX sends it every 10 seconds. These rows contain only the mark price.

Exchange sends

WebSocket messagereceived 2026-10-05 19:14:59.991433 UTC

{
"arg": {
"channel": "mark-price",
"instId": "BTC-USDT-SWAP"
},
"data": [
{
"instId": "BTC-USDT-SWAP",
"instType": "SWAP",
"markPx": "85623.5",
"ts": "1791227699708"
}
]
}

You download

Parquet row · mark_price

Point at a line in the message or a column in the row to trace where each value comes from. Click a column to pin it.

Our tests replay this message through the production pipeline

All OKX Futures mapping rules →

Conventions for every exchange are in the wire formats overview. Column types and units for funding rate data are in the schema below.

Use cases

What you can build with funding rate data

Funding carry and basis
Measure what it cost to hold a perpetual position over time and compare it with spot or dated futures.
Cross-exchange funding spreads
Find persistent funding differences for the same asset across venues for relative-value research.
Mark vs. index dislocation
Track the gap between mark and index price to study premium, sentiment, and liquidation risk.

Coverage

Funding rate coverage

Every venue is stored under its own exchange ID, so spot and derivatives never mix. Bars show each venue's history from its first hourly file to today, or to its last file for a venue that is no longer collected. Symbol counts are live from the symbols API.

Funding rate coverage by venue, exchange ID, market, history start, and live symbol count
VenueExchange IDMarketHistoryMark price symbols
OKX Futuresokx_futuresFutures
2025-06-2816 mo
641

Other exchanges

Funding & Mark Price data on other exchanges

The same schema on every venue, so switching exchange is a one-argument change.

Or compare every venue on the cross-exchange funding rate overview.

Schema · 8 columns

Normalized mark price schema

Every mark price row carries mark, index, and estimated settle prices plus the current funding rate (a fraction per funding period) and next funding time for perpetual contracts, where the venue publishes them.

Columns in every funding rate Parquet file
ColumnTypeDescription
received_timeINT64Unix timestamp (nanoseconds) when our system received the mark price event
event_timeINT64Unix timestamp when the exchange generated the event (the time unit changes with the exchange)
symbolSTRINGTrading pair symbol (for example, 'BTCUSDT')
mark_priceSTRINGnullableMark price that the exchange uses to calculate liquidations (stored as string for precision)
index_priceSTRINGnullableIndex price from the underlying spot exchanges (stored as string for precision)
estimated_settle_priceSTRINGnullableEstimated settlement price at contract expiration (stored as string for precision)
funding_rateSTRINGnullableCurrent funding rate for perpetual contracts, as a fraction for each funding period (0.0001 = 0.01 %; stored as string for precision). Kraken Futures and Lighter history before the 2026-09 data-integrity release use other units (refer to the venue notes)
next_funding_timeINT64nullableUnix timestamp when the next funding payment will occur. Lighter history before the 2026-09 data-integrity release contains the last funding time instead

Quickstart

From pip install to DataFrame in a minute

The example loads BTC-USDT-SWAP from OKX Futures for 2026-09-02. Change the symbol, exchange, or dates to pull any other slice of the archive.

  1. Install the Python SDK

    pip install cryptohftdata
  2. Create a free API key

    Sign up with email or Google, then generate a key from your dashboard. No credit card.

    Create account
  3. Call get_mark_price()

    Paste the snippet, replace YOUR_API_KEY, and you get a pandas DataFrame with the columns listed above.

okx_funding_rate_data.py
import cryptohftdata as chd

client = chd.CryptoHFTDataClient(api_key="YOUR_API_KEY")

df = client.get_mark_price(
    symbol="BTC-USDT-SWAP",
    exchange=chd.exchanges.OKX_FUTURES,
    start_date="2026-09-02",
    end_date="2026-09-02",
)

print(df.head())
print(f"Mark price updates: {len(df):,}")
REST · no API key needed for single files
curl --fail --location \
  "https://api.cryptohftdata.com/download?file=okx_futures/2026-09-02/12/BTC-USDT-SWAP_mark_price.parquet" \
  -o BTC-USDT-SWAP_mark_price_12.parquet

Caveats

Know this before you backtest

Exchange feeds differ in subtle ways. These are the details that matter for accurate backtests, replay pipelines, and features. Missing hours and pending corrections for every venue are listed on Known Gaps & Corrections.

  1. Funding rate and next funding time ship inside the mark price files ({symbol}_mark_price.parquet) alongside mark, index, and estimated settle prices.

  2. Funding applies to perpetual contracts; rows for other instruments carry mark and index prices without funding fields.

  3. funding_rate is a fraction per funding period. Kraken Futures history before the 2026-09 data-integrity release holds Kraken's absolute funding rate, and Lighter history holds percent; corrections are planned.

  4. OKX funding rows before the release are timestamped with the next settlement time, which introduces look-ahead if you join on event_time; use received_time for that history.

  5. This page starts on 2025-06-28 based on the earliest stored hourly files for its covered exchange IDs and grows as new hourly files are published.

FAQ

Frequently asked questions

Is OKX funding rate data free to download?

Yes. A free CryptoHFTData account with no credit card gives API access to OKX funding rate data and every other dataset. Individual hourly files can also be downloaded without an API key on the rate-limited free tier.

How far back does OKX funding rate data go?

The earliest hourly files start on 2025-06-28, and new files are added every hour. Start dates differ by venue; the coverage table on this page lists each one.

What format are the files in?

Each file holds one symbol for one UTC hour, stored as Zstd-compressed Parquet under {exchange_id}/{YYYY-MM-DD}/{HH}/{SYMBOL}_mark_price.parquet. Parquet reads directly into pandas, Polars, DuckDB, and Arrow.

How do I load OKX funding rate data in Python?

Install the SDK with pip install cryptohftdata, create a client with your API key, and call client.get_mark_price() with a symbol, exchange, and date range. It returns a pandas DataFrame.

Where is the funding rate stored?

Funding rate and next funding time ship inside the mark price files ({symbol}_mark_price.parquet), next to the mark, index, and estimated settle prices.

Start using funding rate data today.

One free API key covers every exchange and every data type. $0.00.