Funding rate API: every exchange's rates in one request, plus settled funding history
In short
- A funding rate API should return, for each exchange, the rate per interval, the interval itself, the next funding time, the rate in 8-hour terms and the futures price.
- Binance, Bybit, OKX and Hyperliquid each have their own endpoints, units and ways to report the interval. Genesis API
/funding/ratesreturns every exchange's rates in one GET request, in percent and normalized to 8 hours. - Settled funding history across 13 exchanges — sums, average rates, APR, a year of daily sums and a bundle screener with
netafter fees — is in/funding/analytics/*on the Pro and Max plans.
A funding rate API returns perpetual futures funding rates by exchange: the rate per interval, the interval itself and the next funding time, and in the fuller version the history of settled funding. Each exchange runs its own API with its own paths, units and intervals, so to compare them you collect the rates into one table, convert them to percent and normalize them to one period, usually 8 hours.
What a funding rate API should return
A rate without its interval tells you nothing: 0.02% every 4 hours and 0.02% every 8 hours differ by a factor of two. That is why a useful crypto funding rates API returns five values for every coin–exchange pair.
| What you need | Why | /funding/rates field |
|---|---|---|
| Rate per interval | What the next payout will be | funding_pct |
| Funding interval | Rates can't be compared without it | interval |
| Next funding time | The position has to be open by then | next_payout |
| Rate per 8 hours | Comparing exchanges with different intervals | funding_8h_pct |
| Futures price | The price gap between legs moves your entry | price |
The payment is position size times the rate: a $10,000 position at 0.01% receives or pays $1 per settlement.
Why exchange intervals differ and how to normalize a rate to 8 hours
Each exchange decides how often to settle funding and can change the interval for an individual contract. In Genesis API analytics, CEX intervals are 8 and 4 hours, while Hyperliquid and Lighter settle every hour. Hyperliquid computes the rate as an 8-hour rate and pays one eighth of it every hour, as described in the Hyperliquid funding rules.
In the Genesis API documentation example, MEXC charges 0.02% on TON every 4 hours: 0.02 × 8 / 4 = 0.04% per 8 hours. A hypothetical example with an hourly interval: exchange A pays 0.004% every hour, exchange B pays 0.02% every 8 hours. By raw numbers A pays a fifth as much, but over 8 hours it comes to 0.004 × 8 / 1 = 0.032% against 0.02%, 1.6 times more.
Normalizing assumes the rate holds for the whole period, and an hourly rate can change by the very next settlement. Only the history shows what was actually paid.
APR is computed from the 8-hour rate: three settlements a day, 1,095 a year. For exchange A that's 0.032 × 3 × 365 = 35.04% a year, as long as the rate holds.
Funding rate APIs on the exchanges: Binance, Bybit, OKX and Hyperliquid
Each major exchange has its own funding rate API: its own paths, fields and way of reporting the interval.
| Exchange | Current rate | History | Interval |
|---|---|---|---|
| Binance | GET /fapi/v1/premiumIndex | GET /fapi/v1/fundingRate | GET /fapi/v1/fundingInfo |
| Bybit | GET /v5/market/tickers | GET /v5/market/funding/history | fundingIntervalHour field |
| OKX | GET /api/v5/public/funding-rate | GET /api/v5/public/funding-rate-history | from fundingTime and nextFundingTime |
| Hyperliquid | POST /info, metaAndAssetCtxs | POST /info, fundingHistory | every hour |
The Binance funding rate API returns the rate and the next funding time in the lastFundingRate and nextFundingTime fields of premiumIndex (Binance docs), and Binance historical funding rates come from fundingRate, which takes startTime and endTime (funding rate history). fundingInfo returns the interval only for contracts whose interval or rate cap the exchange has adjusted (endpoint description).
Bybit returns fundingRate, nextFundingTime and fundingIntervalHour in a single tickers response with category=linear (Bybit tickers), and its history request requires symbol (Bybit funding history). As the docs point out, each contract has its own interval.
For OKX, the docs suggest working out a contract's interval from the difference between nextFundingTime and fundingTime (OKX docs).
Hyperliquid takes all data queries at POST https://api.hyperliquid.xyz/info, and the JSON body decides what comes back: {"type": "metaAndAssetCtxs"} returns the current funding per asset, {"type": "fundingHistory", "coin": "ETH", "startTime": …} returns rate history (Hyperliquid docs).
To merge these exchanges into one table, your code has to:
- convert rates from fractions to percent;
- find each contract's interval and normalize the rate to 8 hours;
- convert timestamps from milliseconds and map tickers:
BTCUSDT,BTC-USDT-SWAP,BTC, plus multipliers such as1000PEPEon smaller coins; - respect each exchange's rate limits and update the code when it changes its API.
Every exchange in one request: /funding/rates
GET /funding/rates returns, for each coin, the list of exchanges with the current rate: Binance, OKX, Bybit, Bitget, MEXC, Gate, BingX, HTX, Hyperliquid and the other exchanges Genesis Arbitrage covers, 1000+ coins in total. The coin and exchange filters (comma-separated for several exchanges) are optional; without them you get the full set.
curl --compressed \
"https://api.genesisarbitrage.com/v1/funding/rates?coin=TON" \
-H "X-API-Key: gns_live_XXXXXXXXXXXXXXXX"
{
"coin": "TON",
"exchanges": [
{
"exchange": "MEXC",
"funding_pct": 0.02,
"funding_8h_pct": 0.04,
"next_payout": "00:00",
"interval": "4h",
"price": 2.184,
"trade_url": "https://futures.mexc.com/exchange/TON_USDT"
}
]
}
This is one element of the data array inside the envelope all Genesis API responses share: success, data, meta. Rates are in percent, next_payout is the payout time as HH:MM UTC, empty values are null, and Hyperliquid appears as Hyper. All fields and the Try it form are in the Funding rates docs section.
/funding/rates and /funding/spread are on every plan, starting with Trial at $20 a month: 500K calls, 1 request per second, 60 s data freshness (Genesis API pricing).
Funding spread: /funding/spread
Funding spread is the difference between a coin's highest and lowest rate across exchanges after normalizing to 8 hours. The short goes where the rate is higher and the long where it is lower: the short receives its exchange's rate, the long pays its own (or receives when that rate is negative), and the difference is what remains.
GET /funding/spread returns, for each coin, the best exchange pair in best: exchange_1 and exchange_2, their rates per their own interval (funding_1_pct, funding_2_pct), the intervals, payout times and terminal links. The pair's spread is in spread_pct, the other exchanges are in others, and the filters are coin and min_spread (Funding spread docs). A pair's intervals often differ, like 1h and 8h for BTC in the documentation example, so compare the pair's rates by hand only after normalizing them to 8 hours.
Python: top 10 funding spreads, annualized
The script takes the full /funding/rates set and, for each coin, finds the exchanges with the highest and lowest funding_8h_pct: the difference is the 8-hour spread, annualized as spread × 3 × 365. On 429 and 503 it waits Retry-After seconds, but no longer than a minute: when the monthly quota is used up, Retry-After runs until the quota resets.
import os
import time
import requests
URL = "https://api.genesisarbitrage.com/v1/funding/rates"
HEADERS = {"X-API-Key": os.environ["GENESIS_API_KEY"]}
def fetch_rates():
for _ in range(3):
r = requests.get(URL, headers=HEADERS, timeout=20)
if r.status_code not in (429, 503):
r.raise_for_status()
return r.json()["data"]
# 429 or 503: wait Retry-After, but no longer than a minute
time.sleep(min(int(r.headers.get("Retry-After", "5")), 60))
raise RuntimeError("API did not respond after three attempts")
rows = []
for item in fetch_rates():
ex = [e for e in item["exchanges"]
if e["funding_8h_pct"] is not None]
if len(ex) < 2:
continue
short = max(ex, key=lambda e: e["funding_8h_pct"]) # short leg
long_ = min(ex, key=lambda e: e["funding_8h_pct"]) # long leg
spread = short["funding_8h_pct"] - long_["funding_8h_pct"]
rows.append((spread, item["coin"], short, long_))
rows.sort(key=lambda x: x[0], reverse=True)
for spread, coin, short, long_ in rows[:10]:
apr = spread * 3 * 365 # simple APR on one leg's notional
print(f"{coin:<10} short {short['exchange']:<8} "
f"long {long_['exchange']:<8} {spread:.4f}% per 8h "
f"APR {apr:.1f}%, on capital {apr / 2:.1f}%")
The annualized figure here is on one leg's notional. Both legs need money, so on the total capital without leverage the yield is half as much, as in the apr_capital analytics field. A hypothetical example: short on an exchange at 0.05% per 8 hours, long on one at 0.01%. The spread is 0.05 − 0.01 = 0.04%, annualized 0.04 × 3 × 365 = 43.8% per leg and 21.9% on capital.
Fees aren't included. A hypothetical example: a 0.05% taker fee on each of four trades (opening and closing both legs) comes to 4 × 0.05 = 0.2% of a leg's notional. A 0.04% spread earns that back in 0.2 / 0.04 = 5 settlements, or 40 hours, if the rates stay put.
Only a 200 response counts against the quota. In a monitor, poll no more often than once per meta.freshness_sec seconds and send the previous ETag in If-None-Match: an unchanged full set comes back as an unbilled 304. More in the limits guide and in lesson 4 of the crypto API course, which builds a spread and funding monitor in Python.
Settled funding history: /funding/analytics/*
The current rate shows the next settlement; history shows what was actually paid. It comes from four analytics endpoints: 13 exchanges, rates in percent per settlement period, timestamps in epoch seconds UTC. They are on the Pro ($100 a month) and Max ($200) plans; Trial and Start get 403 plan_restricted.
| Endpoint | Contents | Full section |
|---|---|---|
/funding/analytics/summary | Sums, average 8-hour rates, APR and coverage for 7 periods, from 1 day to a year | ~600 KB gzip |
/funding/analytics/recent | Every payout over the last 7 days | ~1 MB gzip |
/funding/analytics/daily | Daily sums over 365 days | up to ~12 MB gzip |
/funding/analytics/top | Top 50 coin×exchange pairs and top 50 short/long bundles per period | — |
Full downloads without coin are limited: summary and recent once per 60 seconds, daily once per 300 seconds per key; a request before the window ends gets 429 with Retry-After. coin slices and 304 replies are not limited, so fetch a coin's history like this:
curl --compressed -G \
"https://api.genesisarbitrage.com/v1/funding/analytics/summary" \
-d coin=BTC \
-H "X-API-Key: gns_live_XXXXXXXXXXXXXXXX"
In the summary every coin×exchange pair carries the interval interval_h, the data start data_since, the latest 8-hour rate last8h for a "now vs norm" comparison, and an m array of 14 metrics per period: sum, avg8h, apr, cov, flips and others. Documentation example: BTC on Binance over 7 days, 21 positive settlements, avg8h 0.006298%, apr 0.006298 × 3 × 365 ≈ 6.896%. Parsing m, recent and daily is covered in the funding endpoints guide, and the fields in the Funding analytics docs section.
The top bundle screener
/funding/analytics/top is a ready-made screener with no parameters. Bundle legs in it are always on different exchanges with coverage of at least 0.9, and bundles with net ≤ 0 never make the lists.
gross is the bundle's gross funding for the period, fees is four trades' fees from the taker_fees table, and net = gross − fees. apr_net is annualized on one leg's notional, apr_capital is half that, on the capital of both legs. win_rate is the share of profitable days, max_dd the largest drawdown, and price_div the current price gap between the legs, which net leaves out.
In the documentation example, the PEPE bundle (short on HTX, long on Hyperliquid under the 1000PEPE ticker) made gross 1.51504% with fees of 0.19 over 7 days. So net = 1.51504 − 0.19 = 1.32504%, apr_net is 69.09% and apr_capital 34.55%. Ready-made lists: by_net_apr by net yield, by_stable for steady bundles, by_live for those working right now.
Funding rate as a market indicator
With a positive rate, longs with leverage pay shorts; with a negative one, it's the other way round. A small positive rate is normal (Hyperliquid fixes the interest component at 0.01% per 8 hours), and the rate becomes a signal when it moves well away from its usual level.
Read a high rate together with open interest: when both climb, a lot of leveraged positions are stacked on one side, and a move against them sets off a liquidation cascade. /market/open-interest returns open interest by exchange (docs section). More in Funding rate as a market indicator.
Funding arbitrage risks
A short/long bundle across two exchanges barely depends on price, but you can still lose money on it:
- the rate changes before settlement and can flip sign, and only a position open at the settlement moment gets paid;
- leg prices diverge: if the short exchange's price is below the long exchange's, the entry starts in the red, so check
priceorprice_div; - fees and slippage: there are four trades, and on a thin order book the entry costs more than the table shows;
- liquidation of one leg: margin doesn't move between exchanges, and liquidation is triggered on the mark price;
- the exchange can change a contract's interval or rate cap; on Binance such contracts are listed by
fundingInfo.
Without code, the same rates are in the Funding Arbitrage table (guide), the spread calculator works out a bundle with fees, and the crypto API overview compares market data APIs in general.
Questions and answers
Where can I get historical funding rates?
Exchanges keep history in their own formats: GET /fapi/v1/fundingRate on Binance, GET /v5/market/funding/history on Bybit, the fundingHistory type on Hyperliquid. Genesis API returns the history of 13 exchanges in one format: /funding/analytics/recent for payouts over 7 days, /funding/analytics/daily for daily sums over a year and /funding/analytics/summary for period totals, on the Pro and Max plans.
Why do funding rates differ between exchanges?
Each exchange has its own traders, liquidity, rate formula and caps, so the position imbalance builds up differently. Intervals differ too: 8 or 4 hours on CEX, every hour on Hyperliquid. Compare rates after normalizing them to one period; in Genesis API that's the funding_8h_pct field.
How often are funding rates updated in the API?
The current rate on an exchange changes until settlement; the settled rate is fixed and goes into history. Genesis API data freshness is 60 s on Trial, 30 s on Start, 10 s on Pro and 5 s on Max; the analytics summary's ETag changes about every 15 minutes, and daily sums are rebuilt hourly.
Is there a free funding rate API?
Genesis API has no free plan: funding rates and spread are in Trial at $20 a month, history in Pro at $100 and Max at $200. On the site, funding rates and spreads are visible without a plan in Funding Arbitrage.