TIKTAPE
TikTape Learn

How do I get Hyperliquid historical funding rates?

Send a fundingHistory request (coin, startTime in ms) to POST api.hyperliquid.xyz/info; no key is needed. Funding is hourly and each call returns at most 500 rows, so page from the last row's time + 1. Pair it with candles from TikTape for carry backtests.

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

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

SourceWhat you get
Info API fundingHistoryHourly 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 datasetFree 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.

TikTape at a glance

Price
Full history: $19/month or $189/year; monthly starts with 1 month free (card required, cancel anytime). One-time candle packs from $7. 60 requests/min, up to 10,000 candles per request. Free no-signup sample: a week of BTC/ETH 1m candles as CSV.
Coverage
800+ Hyperliquid markets (perps, spot and HIP-3), 15 intervals from 1m to 1M. Perp and spot candles from 2025-03-23 at every interval; 1d, 3d, 1w and 1M back to each market's first Hyperliquid candle (BTC and ETH from 2020-08-19), 4h from 2024-08-13; HIP-3 markets from their listing. Candles from 2025-03-23 are built from Hyperliquid's S3 trade archives and live API; earlier candles are Hyperliquid's own candleSnapshot candles, not rebuilt from trades.
Quickstart
  1. Get a key at https://tiktape.xyz/#pricing (1 month free, then $19/mo; key emailed after checkout).
  2. Fetch candles (each row is [timestamp_ms, open, high, low, close, volume]):
    export TIKTAPE_API_KEY=your_key
    curl -H "X-API-Key: $TIKTAPE_API_KEY" \
      "https://tiktape.xyz/api/v1/ohlcv?coin=BTC&interval=1h&limit=24"
  3. Page backwards with endTime for older history. Full contract: https://tiktape.xyz/openapi.yaml.