Short answer
Send {"type": "fundingHistory", "coin": "BTC", "startTime": <ms>} to POST https://api.hyperliquid.xyz/info. No key or signature is needed. Each row has coin, fundingRate, premium and time. Hyperliquid pays funding every hour, and a time-range response returns at most 500 rows, so you page by setting the next startTime to the last row's time + 1.
What the official docs say
- Request fields:
type="fundingHistory",coin,startTimein milliseconds (inclusive) and an optionalendTime(inclusive, defaults to now). - "Responses that take a time range will only return 500 elements or distinct blocks of data. To query larger ranges, use the last returned timestamp as the next startTime for pagination."
- "The funding rate on Hyperliquid is paid every hour," at one eighth of the computed 8-hour rate.
Sources: Hyperliquid perpetuals info endpoint, info endpoint pagination, Hyperliquid funding.
Download funding history to CSV with Python
import csv, time
import requests
URL = "https://api.hyperliquid.xyz/info"
def funding_history(coin, start_ms, end_ms=None):
"""All hourly funding rates for coin from start_ms (inclusive)."""
rows = []
while True:
body = {"type": "fundingHistory", "coin": coin, "startTime": start_ms}
if end_ms is not None:
body["endTime"] = end_ms
page = requests.post(URL, json=body, timeout=30).json()
rows += page
if len(page) < 500: # the API returns at most 500 rows per call
return rows
start_ms = page[-1]["time"] + 1
time.sleep(0.2)
rows = funding_history("BTC", 1735689600000, 1738368000000) # January 2025
with open("btc_funding.csv", "w", newline="") as f:
w = csv.DictWriter(f, fieldnames=["time", "coin", "fundingRate", "premium"])
w.writeheader()
w.writerows(rows)
print(len(rows), "hourly rates") # 744 = 31 days x 24
We ran this against the live API on 2026-11-29: it returned 744 rows for January 2025, two pages. fundingRate is the hourly rate as a decimal string (0.0000125 is 0.00125% per hour). For a wallet's own funding payments use userFunding instead.
Other places funding history lives
| Source | What you get |
|---|---|
Info API fundingHistory | Hourly rate and premium per coin, free, 500 rows per call |
s3://hyperliquid-archive/asset_ctxs/ | Daily asset context files (requester pays); see where Hyperliquid tick data lives |
| ccxt-tiktape sample dataset | Free CSV of BTC and ETH hourly funding plus 1h/1d candles, August to October 2026 |
Funding plus candles for a carry backtest
TikTape does not serve funding rates; the official endpoint above already returns full funding history for free. What the official API cannot give you is price history: candleSnapshot stops at the most recent 5,000 candles. To mark a funding or basis strategy to market over months, pair the funding rows with candles from TikTape's GET /api/v1/ohlcv, which serves every interval back to 2025-03-23 and 1d back to 2020-08-19:
curl -H "X-API-Key: $TIKTAPE_API_KEY" \
"https://tiktape.xyz/api/v1/ohlcv?coin=BTC&interval=1h&limit=24"
Join the two on the hour: funding time lands a few milliseconds after each hour, so floor it to the hour before matching it with a 1h candle's open time.