# Crypto perpetual funding rate history API

> Every funding event of each USD-margined crypto perpetual, delisted contracts included, over a REST API, billed one row per bar.

Source: https://getmarkethistory.com/docs/guides/crypto-funding-rates

The `crypto-futures` dataset carries the funding rates of its perpetuals: every funding event of
each USD-margined contract from its first month on, delisted contracts included. The same
contracts have 1-minute bars from January 2020.

## Sample request

```bash
curl "https://getmarkethistory.com/query/v1/funding?symbol=BTCUSDT&start=2024-01-01&end=2024-12-31&format=csv" \
  -H "Authorization: Bearer $MARKET_HISTORY_KEY"
```

| Column       | Meaning                                                            |
| ------------ | ------------------------------------------------------------------ |
| `timestamp`  | when the rate was computed, UTC, to the millisecond                |
| `rate`       | the rate as a fraction: 0.0001 is 0.01%; positive means longs pay  |
| `interval_h` | the contract's funding interval at that time, in hours (8, 4 or 1) |

One symbol per request; `/api/v1/symbols?source=crypto-futures&timeframe=1m` lists them. Pages run
oldest first; follow `X-Next-Cursor` for the next one. Formats: `jsonl` (default), `csv`, `json`,
`parquet`, `arrow`. Full reference: [Funding rates](https://getmarkethistory.com/docs/funding).

## Which contracts are covered?

Every USD-margined perpetual the exchange has listed since late 2019, including the ones it has
since delisted, so a backtest over them is not survivorship-biased. Dated quarterly contracts are
not included.

## How fresh is it?

New funding events of the contracts still trading are added every night, so the newest row is
under a day old. Each month is checked again, row by row, once the exchange posts its monthly
file; a published row is never changed after that.

## Do funding intervals change?

Yes. Most contracts fund every 8 hours; some move to 4 or 1 hours. Each row carries the interval
that applied, so sum `rate` per row rather than assuming three a day.

## How much does it cost?

One row is one bar, a page rounds up to a block of 100, and an empty page is free. A year of one
8-hour contract is about 1,100 rows: 1,100 bars. Funding rates need bought bars; a free account's
monthly bars pay for 1h bars only. There is no keyless sample for funding rates. See
[Limits & billing](https://getmarkethistory.com/docs/limits).

## What else is there for perpetuals?

1-minute bars (`/query/v1/bars/crypto-futures/{ticker}/1m`) on the same key and the same bill.
Two more series are being backfilled: 1-minute mark, index and premium prices
([Perpetual prices](https://getmarkethistory.com/docs/perp-prices)) and 5-minute open interest with long/short ratios
([Open interest](https://getmarkethistory.com/docs/open-interest)).
