Hyperliquid funding rates: formula, history and API
Hyperliquid pays funding every hour. This page covers the formula and its limits from Hyperliquid's funding docs, the API requests for past, current and predicted rates, and how to pull funding history from Ironflow's REST API with curl and Python.
The short version#
- Interval: every hour, at one eighth of the computed 8-hour rate.
- Cap: 4% per hour, the same for every asset.
- Settled rates:
fundingHistory, 500 hourly rows per response. - Current and next rate:
metaAndAssetCtxsandpredictedFundings. - Per wallet:
userFunding. - Ironflow:
/v1/fundingstores the live rate as it moves inside each hour, for every perp market. No key needed for the last 24 hours.
1. How funding works#
- Funding is paid between traders. Hyperliquid collects no fee on it.
- A positive rate means longs pay shorts. A negative rate means shorts pay longs.
- The payment is
position_size * oracle_price * funding_rate. The position is valued at the oracle price. - The cap is 4% per hour. The cap and the interval do not depend on the asset.
- HIP-3 builder markets use a different premium formula. Their deployers also set a funding multiplier and an interest rate.
2. The formula#
# 8-hour rate; each hour pays F / 8
F = P + clamp(interest_rate - P, -0.0005, 0.0005)
# P: average premium index over the hour, sampled every 5 seconds
premium = impact_price_difference / oracle_price
impact_price_difference = max(impact_bid_px - oracle_px, 0) - max(oracle_px - impact_ask_px, 0)- The interest rate is fixed at 0.01% per 8 hours, which is 0.00125% per hour. Hyperliquid's docs put it at 11.6% APR, paid to shorts.
impact_bid_pxandimpact_ask_pxare the average prices to trade the market's impact notional on each side.- When the premium is within 0.05% of the interest rate, the clamp cancels it and the rate equals the interest rate. That is why many hours print
0.0000125. BTC paid it in 7 of the 8 hourly payments from 01:00 to 08:00 UTC on 27 October 2026.
3. fundingHistory#
curl -s https://api.hyperliquid.xyz/info \
-H 'Content-Type: application/json' \
-d '{"type":"fundingHistory","coin":"BTC","startTime":1793062800000}'[
{ "coin": "BTC", "fundingRate": "0.0000125", "premium": "-0.0003824145", "time": 1793062800010 },
{ "coin": "BTC", "fundingRate": "0.0000125", "premium": "-0.0003604429", "time": 1793066400048 },
{ "coin": "BTC", "fundingRate": "0.0000080021", "premium": "-0.0004359831", "time": 1793070000112 }
]
# trimmed to the first three hours- One row per hourly payment.
fundingRateis the hourly rate paid.premiumis the premium for that hour. startTimeis required.endTimedefaults to now. Both are Unix milliseconds and inclusive.- A response holds at most 500 rows. Page forward with the last
timeplus 1. - The request has weight 20, plus extra weight for every 20 rows returned.
- HIP-3 markets use the dex prefix:
"coin":"xyz:XYZ100".
4. Current and predicted rates#
metaAndAssetCtxs returns one context per market. Its funding field is the current hourly rate. The same object has premium, oraclePx, markPx and openInterest.
curl -s https://api.hyperliquid.xyz/info \
-H 'Content-Type: application/json' \
-d '{"type":"metaAndAssetCtxs"}' \
| jq -c '[.[0].universe, .[1]] | transpose | .[:3][] | {coin: .[0].name, funding: .[1].funding, premium: .[1].premium}'predictedFundingsreturns the predicted next rate per coin, for the first perp dex only. Each coin has a list of venues. Hyperliquid's own entry is HlPerp:
curl -s https://api.hyperliquid.xyz/info \
-H 'Content-Type: application/json' \
-d '{"type":"predictedFundings"}' \
| jq -c '.[] | select(.[0] == "BTC") | .[1][] | select(.[0] == "HlPerp")'
# ["HlPerp",{"fundingRate":"0.0000125","nextFundingTime":1793088000000,"fundingIntervalHours":1}]5. Funding paid by a wallet#
curl -s https://api.hyperliquid.xyz/info \
-H 'Content-Type: application/json' \
-d '{"type":"userFunding","user":"0xYOUR_ADDRESS","startTime":1793000000000}'Each row has time and a delta with coin, usdc, szi and fundingRate. usdc is positive when the wallet received funding. szi is the signed position size. A short of 0.001 BTC at a rate of 0.0000125 received 0.001002 USDC for one hour.
6. Ironflow /v1/funding#
Ironflow stores the funding field of every perp market, HIP-3 markets included. We poll the asset contexts about every 10 seconds for native markets and less often for HIP-3 markets. A row is written when the rate changes, plus at least one row per hour. The data starts on 2025-09-27.
curl -s "https://api.ironflow.sh/v1/funding?market=BTC-PERP&limit=1"Free keyWithout a key the API reaches 24 hours back. A free key reaches 30 days at 60 requests a minute. Get one by email.
{
"data": [
{
"source": "hyperliquid",
"market": "BTC-PERP",
"issuer": "",
"base_market": "BTC-PERP",
"timestamp": 1793088012857,
"rate": "0.0000125",
"sequence": 0,
"venue": "hyperliquid",
"quote_asset": "USDC",
"display_symbol": "BTC-PERP"
}
],
"pagination": { "next_cursor": null, "has_more": false }
}marketis required. Other parameters:base_market,issuer,from,to,limitup to 1000 andcursor.- An hour with a flat rate has one row. An hour where the premium moves can have hundreds: BTC had 327 rows between 02:00 and 03:00 UTC on 27 October 2026.
- The rows show how the rate moved inside the hour. They are not the settled payment. That hour settled at
0.0000080021. Our last row before 03:00 read0.0000079574. For settled rates usefundingHistory. - Without a key you get the last 24 hours at 10 requests a minute. A free key gives 30 days at 60 a minute.
The same data is in the hl.funding table of the SQL endpoint, POST /v1/query, which also works without a key.
7. Funding stats#
/v1/analytics/funding-stats buckets the stored rows by interval: 1h, 4h, 8h, 1d or 7d. It works without a key. The range per request is 1 hour without a key, 6 hours with a free key and 7 days on Builder.
NOW=$(date +%s000)
curl -s "https://api.ironflow.sh/v1/analytics/funding-stats?market=BTC-PERP&interval=1h&from=$((NOW - 3600000))&to=$NOW"# BTC-PERP, 02:00 to 03:00 UTC on 27 October 2026
{
"data": [
{
"source": "hyperliquid",
"market": "BTC-PERP",
"bucket": 1793066400000,
"avg_rate": "0.000007605881345565749",
"min_rate": "-0.0000054121",
"max_rate": "0.000010035",
"cumulative_rate": "0.0024871232"
}
]
}min_rateandmax_rategive the range the live rate covered. In this hour it went negative before it settled positive.avg_rateaverages the stored rows. Hours with many rate changes have many rows.cumulative_ratesums the stored rows. It is not the funding paid over the bucket. To total funding paid, sumfundingRatefromfundingHistory.
8. Python examples#
Settled rates from Hyperliquid#
Pages through fundingHistory and annualizes the average hourly rate. Standard library only.
# hourly funding for one coin from Hyperliquid, paged 500 rows at a time
# usage: python3 funding_history.py BTC 30
import json, sys, time, urllib.request
coin, days = sys.argv[1], int(sys.argv[2])
start = int(time.time() * 1000) - days * 86_400_000
rows = []
while True:
body = json.dumps({"type": "fundingHistory", "coin": coin, "startTime": start}).encode()
req = urllib.request.Request("https://api.hyperliquid.xyz/info", body, {"Content-Type": "application/json"})
page = json.load(urllib.request.urlopen(req))
rows += page
if len(page) < 500:
break
start = page[-1]["time"] + 1 # the next page starts after the last row
total = sum(float(r["fundingRate"]) for r in rows)
print(f"{coin}: {len(rows)} hourly payments, sum {total:.6f}")
print(f"average annualized: {total / len(rows) * 24 * 365:.2%}")$ python3 funding_history.py BTC 30
BTC: 720 hourly payments, sum 0.006819
average annualized: 8.30%Snapshots from Ironflow#
Pages through /v1/funding with the cursor and keeps the last row in each hour. No key needed.
# funding rate snapshots for one market from Ironflow, last 24 hours, no key
# usage: python3 ironflow_funding.py BTC-PERP
import json, sys, time, urllib.parse, urllib.request
market = sys.argv[1]
now = int(time.time() * 1000)
params = {"market": market, "from": now - 86_400_000, "to": now, "limit": 1000}
rows = []
while True:
url = "https://api.ironflow.sh/v1/funding?" + urllib.parse.urlencode(params)
page = json.load(urllib.request.urlopen(url))
rows += page["data"]
if not page["pagination"]["has_more"]:
break
params["cursor"] = page["pagination"]["next_cursor"]
# keep the last snapshot in each UTC hour
last = {}
for r in rows:
last[r["timestamp"] // 3_600_000] = r["rate"]
print(f"{market}: {len(rows)} snapshots over {len(last)} hours")
for hour, rate in sorted(last.items())[-3:]:
print(time.strftime("%Y-%m-%d %H:00", time.gmtime(hour * 3600)), rate)$ python3 ironflow_funding.py BTC-PERP
BTC-PERP: 940 snapshots over 25 hours
2026-10-27 06:00 0.0000125
2026-10-27 07:00 0.0000125
2026-10-27 08:00 0.0000125With a key, add the header Authorization: Bearer YOUR_KEY to the request and widen from to 30 days.
Questions#
How often is funding paid on Hyperliquid?#
Every hour. The formula gives an 8-hour rate and each hour pays one eighth of it.
What is the maximum funding rate on Hyperliquid?#
4% per hour. The cap and the interval are the same for every asset.
How do I get Hyperliquid funding rate history?#
Send fundingHistory with a coin and startTime. Each response holds at most 500 hourly rows, so page forward with the last time. Ironflow's /v1/funding has funding from 2025-09-27, as snapshots of the live rate.
Why is the Hyperliquid funding rate often 0.0000125?#
That is the interest rate alone: 0.01% per 8 hours, or 0.00125% per hour. When the premium is within 0.05% of the interest rate, the clamp in the formula cancels the premium.
How do I get predicted funding on Hyperliquid?#
predictedFundings returns the next rate and nextFundingTime per coin for the first perp dex. The funding field in metaAndAssetCtxs is the current rate for every market.
How do I see funding payments for my wallet?#
Send userFunding with your address and a startTime. Each row has the coin, the USDC paid or received, the position size and the rate.
Related guides#
- Hyperliquid historical data: API, S3 archive and Python
- Hyperliquid trades and fills data
- Hyperliquid candles and OHLCV data
- Hyperliquid liquidation data: history, levels and API
- Hyperliquid order book data: L2, L4 and history
- Hyperliquid API rate limits explained
References#
- Hyperliquid docs: Funding. The formula, the interest rate, the 4% cap and the payment rule.
- Hyperliquid docs: Info endpoint, perpetuals. fundingHistory, predictedFundings, userFunding and metaAndAssetCtxs.
- Hyperliquid docs: Info endpoint. The 500 element limit on time range responses.
- Hyperliquid docs: Rate limits and user limits. Request weights, including the extra weight per 20 rows.
- Ironflow docs: List funding rates. Parameters and fields of /v1/funding.
- Ironflow docs: Funding stats. Parameters of /v1/analytics/funding-stats.
Funding, liquidations, fills and open interest for every Hyperliquid perp are on the API page. The last 24 hours need no key. A free key gives 30 days. To read funding and every other chain event from your own server, see the nodes page.