Hyperfolio
Guide

Hyperliquid Historical Data 2026: Candles, Funding & S3

Get Hyperliquid historical data: candleSnapshot candles and the 5,000 limit, hourly funding history, fills, S3 archives, rate limits and a Python CSV script.

October 18, 202610 min

Hyperliquid Historical Data Guide 2026: Candles, Funding History and S3 Archives

The short version: Hyperliquid gives you historical data from three places. The public info API returns candles (candleSnapshot, only the most recent ~5,000 per interval), funding history (fundingHistory, 500 rows per response) and your own fills and orders. The hyperliquid-archive and hl-mainnet-node-data S3 buckets hold L2 book snapshots, asset contexts, fills and explorer blocks, but the requester pays the transfer and there are no candles there. Anything else you have to record yourself. Below: exact request bodies, how far back each interval goes, pagination, rate limits and a Python script that exports candles to CSV.

Where Hyperliquid historical data lives

SourceWhat you getLimits
Info API candleSnapshotOHLCV candles for perps, spot and HIP-3 marketsOnly the most recent ~5,000 candles per coin and interval
Info API fundingHistoryEvery hourly funding rate and premium for a perp500 rows per response; paginate with startTime
Info API userFillsByTime, historicalOrdersYour own (or any address's) fills and orders2,000 per response; only the 10,000 most recent fills; 2,000 most recent orders
S3 hyperliquid-archiveHourly L2 book snapshots (market_data) and daily asset contexts (asset_ctxs)Uploaded roughly monthly, no guarantee of completeness, requester pays
S3 hl-mainnet-node-dataFills by block, explorer blocks, L1 transactions, misc events (transfers, staking, funding)Large raw files, requester pays

The official docs are explicit that S3 has no candles and no spot asset data: "You can use the API to record additional historical data sets yourself." That single sentence explains most of what follows.

Candles: the candleSnapshot endpoint

Send a POST to https://api.hyperliquid.xyz/info with no API key:

{"type": "candleSnapshot",
 "req": {"coin": "BTC", "interval": "1h",
         "startTime": 1789974000000, "endTime": 1792306800000}}

Each candle comes back as an object with short keys: t open time and T close time (epoch milliseconds), o/h/l/c prices, v volume in the base asset (BTC, not USD), n number of trades, s the coin and i the interval. Prices and volume are strings, so convert them before doing maths.

Supported intervals are 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w and 1M. For a HIP-3 (builder-deployed) market you prefix the coin with the DEX name, for example xyz:XYZ100.

How far back can you go?

The docs say only the most recent 5,000 candles are available. That turns into very different time windows depending on the interval:

Interval≈ 5,000 candles covers
1mabout 3.5 days
5mabout 17 days
15mabout 52 days
1habout 208 days
4habout 2.3 years
1d and abovemore than you will need

We checked it on 18 October 2026 around 07:06 UTC: asking for ten days of BTC 1-minute candles returned 5,167 candles, starting on 14 October at 17:00 UTC. The API did not complain about the earlier startTime; it simply returned what it still had. So if your backtest needs a year of 1-minute bars, the API alone can't give it to you. Either use a coarser interval or start recording 1-minute candles today (the WebSocket candle subscription or a scheduled job).

Two more things that trip people up: the last candle in the response is usually still forming (in our test the 07:00 UTC hourly candle showed 4.08 BTC of volume a few minutes in, against 1,568 and 2,139 BTC for the first two full hours of our 30-day download), and v is base-asset volume, so multiply by price if you want dollar volume.

Funding history: fundingHistory

Funding on Hyperliquid is paid every hour, and the full history for each perp is available:

{"type": "fundingHistory", "coin": "BTC",
 "startTime": 1787640000000}

Each row has coin, fundingRate (the hourly rate), premium and time. One response holds up to 500 rows, which at one print per hour is about 20.8 days. To get more, take the last time, add one millisecond and use it as the next startTime; this is the general pagination rule the docs give for every time-range endpoint.

Real example: the last 60 days of BTC funding up to 18 October 2026 came back as 1,440 hourly prints (three pages). The average hourly rate was 0.00001044, which is about 9.15% a year if you annualise it with 24 × 365. A positive rate means longs pay shorts. If you want to know what funding did to your PnL rather than to the market, use userFunding for your address, or read our funding rate and PnL guide.

Your own trade history: fills and orders

For an address, userFillsByTime returns up to 2,000 fills per response, and only the 10,000 most recent fills are reachable at all. historicalOrders returns at most the 2,000 most recent orders. Active traders and bots hit the 10,000-fill ceiling quickly, which is why tax and journaling tools recommend exporting regularly. The Hyperliquid docs also point to a third-party export interface built by the Enigma team (trade-export.hypedexer.com) for older history; it is independently maintained, so treat it as such. We cover the CSV workflow step by step in how to export your Hyperliquid trade history.

The S3 archives (for advanced users)

For market-microstructure work you need the S3 buckets. You will need the AWS CLI and LZ4, and you pay the transfer cost because the buckets are requester-pays:

aws s3 cp s3://hyperliquid-archive/market_data/20230916/9/l2Book/SOL.lz4 /tmp/SOL.lz4 --request-payer requester
unlz4 --rm /tmp/SOL.lz4
head /tmp/SOL
  • Order book: s3://hyperliquid-archive/market_data/[date]/[hour]/l2Book/[coin].lz4
  • Asset contexts: s3://hyperliquid-archive/asset_ctxs/[date].csv.lz4, daily files of per-asset context. In the API, asset contexts are where funding, open interest and mark price live, so this is the official place to look for historical open interest; the API itself only returns the current value (see our open interest guide).
  • Fills: s3://hl-mainnet-node-data/node_fills_by_block (same format as the API); older data sits in node_fills and node_trades, and node_trades uses a different format.
  • Chain history: explorer_blocks, replica_cmds (L1 transactions) and misc_events_by_block (transfers, staking, funding) in hl-mainnet-node-data.

The archive is updated roughly once a month with no guarantee of timeliness, and the docs warn that data may be missing. Don't build anything that assumes yesterday's file exists.

Rate limits you will actually hit

REST calls share a budget of 1,200 weight per minute per IP. Most info requests cost 20. On top of that, candleSnapshot adds weight for every 60 candles returned, and fundingHistory, userFillsByTime, historicalOrders and similar endpoints add weight for every 20 items returned. In practice: paginate with a short pause between calls, cache what you already downloaded, and don't refetch the full 5,000 candles every minute when you only need the newest one. For live data, a WebSocket subscription is cheaper and faster than polling.

Python script: export candles to CSV and summarise funding

No SDK and no keys, only the standard library. It downloads 30 days of BTC hourly candles to btc_1h.csv and averages 60 days of funding. We ran it on 18 October 2026 and got 721 hourly candles and 1,440 funding prints.

import csv, json, time, urllib.request

API = "https://api.hyperliquid.xyz/info"

def post(body):
    req = urllib.request.Request(API, json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
    with urllib.request.urlopen(req) as r:
        return json.load(r)

def candles(coin, interval, start_ms, end_ms):
    out, cursor = [], start_ms
    while cursor < end_ms:
        batch = post({"type": "candleSnapshot", "req": {
            "coin": coin, "interval": interval,
            "startTime": cursor, "endTime": end_ms}})
        if not batch:
            break
        out += [c for c in batch if not out or c["t"] > out[-1]["t"]]
        if batch[-1]["t"] + 1 <= cursor:
            break
        cursor = batch[-1]["t"] + 1
        time.sleep(0.5)
    return out

def funding(coin, start_ms, end_ms):
    out, cursor = [], start_ms
    while cursor < end_ms:
        batch = post({"type": "fundingHistory", "coin": coin,
                      "startTime": cursor, "endTime": end_ms})
        if not batch:
            break
        out += batch
        if len(batch) < 500:
            break
        cursor = batch[-1]["time"] + 1
        time.sleep(0.5)
    return out

if __name__ == "__main__":
    now = int(time.time() * 1000)
    day = 86_400_000
    rows = candles("BTC", "1h", now - 30 * day, now)
    with open("btc_1h.csv", "w", newline="") as f:
        w = csv.writer(f)
        w.writerow(["open_time_utc", "open", "high", "low", "close", "volume", "trades"])
        for c in rows:
            w.writerow([time.strftime("%Y-%m-%d %H:%M", time.gmtime(c["t"] / 1000)),
                        c["o"], c["h"], c["l"], c["c"], c["v"], c["n"]])
    fr = funding("BTC", now - 60 * day, now)
    avg = sum(float(x["fundingRate"]) for x in fr) / len(fr)
    print(f"{len(rows)} hourly candles, {len(fr)} funding prints, "
          f"avg hourly funding {avg:.8f} ({avg * 24 * 365:.2%} annualised)")

Change "BTC" to any perp ("ETH", "HYPE"), or to a HIP-3 name like "xyz:XYZ100" for candles. If you want this for many markets, run it on a schedule and append new rows instead of downloading everything again: that is also how you build the history the API no longer serves.

Common mistakes with Hyperliquid historical data

  • Assuming startTime is honoured. For short intervals it is silently clipped to the last ~5,000 candles. Check the first timestamp you actually received.
  • Treating v as USD. It is in the base asset.
  • Including the forming candle in a backtest. Drop the last candle unless its close time T is in the past.
  • Annualising funding with 8-hour maths. Hyperliquid funding is hourly, so it is rate × 24 × 365.
  • Relying on the API for old fills. After 10,000 fills, the oldest ones are gone from the API. Export early.
  • Mixing time zones. All timestamps are epoch milliseconds in UTC.

Skip the scripts for your own portfolio

Raw candles and funding prints are great for research, but if what you want is your own history (positions, real PnL after fees and funding, how each trade did), you don't need to maintain a data pipeline. Hyperfolio is a free, read-only PWA: paste a Hyperliquid address and it shows positions, PnL including fees and funding, and Smart Money wallets, with no keys and no signatures. Market context (mark price, funding, open interest) is in the Markets hub, for example BTC. If you are opening a Hyperliquid account, the referral code HYPERFOLIO gives you 4% off trading fees (see the referral code guide). For more API recipes, start with our Hyperliquid API Python guide.

FAQ

Does Hyperliquid have a historical data API?

Yes. The public info endpoint (https://api.hyperliquid.xyz/info) returns candles, funding history and per-address fills and orders without any API key. It has depth limits: about 5,000 candles per interval and the 10,000 most recent fills per address.

How do I get more than 5,000 candles from Hyperliquid?

You can't from the API at the same interval. Use a coarser interval, record candles yourself going forward (WebSocket or a scheduled script), or rebuild bars from the S3 fill data.

Are Hyperliquid candles available on S3?

No. The docs state that S3 provides L2 book snapshots and asset contexts, plus node fills and blocks, but not candles or spot asset data.

How often is Hyperliquid funding paid?

Every hour. fundingHistory returns one row per hour with the hourly rate, so annualise with 24 × 365.

Can I download historical open interest?

Not from the info API, which returns the current value only. The asset_ctxs files in the hyperliquid-archive bucket are the official historical source, or you can store snapshots yourself.

Do I need to pay for Hyperliquid historical data?

The API is free within its rate limits. The S3 buckets are requester-pays, so AWS charges you for the data you transfer.

Try Hyperfolio for free

Track your Hyperliquid portfolio in real time with PnL, Smart Money, Markets, Perp Calculator, multi-venue portfolio and push alerts.

HYPERLIQUID

-4% fees

Trade on Hyperliquid · 4% off fees

Hyperfolio is an independent app — no ads, no commissions, no sponsors. Referrals are our only funding; we truly appreciate you trading through our link.

Use referral

Free for you · keeps Hyperfolio running

Related articles