Short answer. The free info endpoint gives you candles (the latest 5,000 per coin and interval: 3.5 days of 1-minute bars, 208 days of hourly bars, all daily bars), funding-rate history (BTC back to May 12, 2023) and your own fills. Order books, open interest and public trades are current-only in the API. For those, Hyperliquid's S3 archives hold hourly L2 book snapshots, daily asset contexts and every fill (you pay AWS transfer). For tick-level history, record the WebSocket yourself or buy it. Placing orders instead? Start with the Hyperliquid API quickstart.
Looking for HYPE token price history rather than market-data APIs? The HYPE token guide covers price, supply and buybacks.
1. What the free API keeps, and where deeper history lives
The Hyperliquid API is built for live trading, so most endpoints answer "what is true now". Each row below was read in the official docs on October 14, 2026 and, where a depth is given, checked against the live API the same day. The last column names the Hyperliquid S3 dataset that picks up where the API stops.
| Data | Info request | How far back (free) | Deeper history (S3) |
|---|---|---|---|
| Candles (OHLCV) | candleSnapshot | Latest 5,000 per coin and interval; 1d covers the whole history | None: S3 has no candles |
| Funding rates | fundingHistory | Back to May 12, 2023 for BTC, 500 rows per call | asset_ctxs (daily files) |
| Public trades | recentTrades · WS trades | Latest prints only (10 for BTC); stream to keep more | node_fills_by_block |
| Order book | l2Book · WS l2Book | Current snapshot only (20 levels per side) | market_data (hourly L2 snapshots) |
| Open interest, mark, oracle | metaAndAssetCtxs | Current values only | asset_ctxs (daily files) |
| Liquidations | userFills (liquidation field) | Fills of one address at a time (any address) | node_fills_by_block |
| Your fills | userFills / userFillsByTime | 2,000 per response, latest 10,000 only | node_fills_by_block |
| Your orders | historicalOrders | The 2,000 most recent | – |
| Your funding payments | userFunding | 500 rows per call, page forward | misc_events_by_block |
All of it is unauthenticated: pass any address to the user-level requests and you get that account's data. The same JSON shapes come back from the WebSocket, so code written against the info endpoint also parses a recorded stream.
2. Candles (OHLCV): candleSnapshot and how far back each interval goes
Answer first: POST {"type":"candleSnapshot","req":{"coin":"BTC","interval":"1h","startTime":…,"endTime":…}} to https://api.hyperliquid.xyz/info, with times in epoch milliseconds. There are 14 intervals (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M), and only the most recent 5,000 candles per coin and interval exist. Each candle has t/T (open and close time), o h l c, v (volume in coins) and n (number of trades).
curl
# BTC 1-hour candles for October 3, 2026 (UTC), times in epoch milliseconds
curl -s -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type":"candleSnapshot","req":{"coin":"BTC","interval":"1h","startTime":1790985600000,"endTime":1791072000000}}'
# Response: 25 candles (endTime is inclusive, so the 00:00 candle of October 4 is included). The first one:
# {"t":1790985600000,"T":1790989199999,"s":"BTC","i":"1h","o":"84483.0","c":"84613.0",
# "h":"84645.0","l":"84410.0","v":"457.48006","n":7067} The 5,000-candle window turns into very different look-backs per interval. A start time older than the window is not an error; you simply get the oldest candles still available. What we got for BTC with startTime 0 on October 14, 2026:
| Interval | Look-back (5,000 candles) | Live check, BTC |
|---|---|---|
| 1m | 3.5 days | 5,078 candles back to October 11, 2026 on October 14, 2026 |
| 5m | 17 days | – |
| 15m | 52 days | – |
| 1h | 208 days | – |
| 4h | 2.3 years | Oldest bar July 3, 2024 on October 14, 2026 |
| 1d | Whole history | 2,248 bars from August 19, 2020; the first 921 have zero volume, trading starts February 26, 2023 |
The window rolls forward with every new bar, so a 1-minute series you do not save today is gone in a few days. Expect the count to come back a little above 5,000 (the 1-minute call returned 5,078); do not rely on an exact number.
The daily trap. Daily candles are the one interval with the whole history, but the series starts on August 19, 2020, long before Hyperliquid traded BTC. The first 921 bars have ordinary-looking open, high, low and close prices with v = 0 and n = 0: those prices did not come from Hyperliquid's order book. Only 1,327 of the 2,248 BTC bars carry Hyperliquid trades, from February 26, 2023. That is harmless on a price chart, but it breaks volume indicators and any backtest that assumes you could have filled there. Filter on n > 0:
curl + Python — every traded day
# Every daily BTC candle Hyperliquid has: startTime 0 is not an error, you get what exists
curl -s -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type":"candleSnapshot","req":{"coin":"BTC","interval":"1d","startTime":0,"endTime":4102444800000}}' \
| python3 -c "import json,sys; c=[x for x in json.load(sys.stdin) if x['n'] > 0]; print(len(c), 'traded days from', c[0]['t'])" HIP-3 markets take their DEX prefix (xyz:XYZ100), and their history starts when the market was deployed: daily XYZ100 candles began on October 13, 2025. The Python SDK only resolves those names if you pass perp_dexs:
Python — daily candles for a crypto and a HIP-3 market
import time
from hyperliquid.info import Info
from hyperliquid.utils import constants
# perp_dexs adds HIP-3 markets (here trade.xyz, dex "xyz") to the SDK's name lookup
info = Info(constants.MAINNET_API_URL, skip_ws=True, perp_dexs=["", "xyz"])
end = int(time.time() * 1000)
start = end - 30 * 24 * 60 * 60 * 1000 # last 30 days
for coin in ["BTC", "xyz:XYZ100"]:
rows = info.candles_snapshot(coin, "1d", start, end) # t, T, s, i, o, c, h, l, v, n
last = rows[-1]
print(coin, len(rows), "daily candles | last close", last["c"], "| volume", last["v"], "| trades", last["n"]) Output on October 4, 2026
BTC 31 daily candles | last close 85275.0 | volume 5280.85925 | trades 84622 xyz:XYZ100 31 daily candles | last close 30860.0 | volume 359.1197 | trades 8678
To write a series to CSV for a backtest:
Python — candles to CSV
import csv
import time
from hyperliquid.info import Info
from hyperliquid.utils import constants
info = Info(constants.MAINNET_API_URL, skip_ws=True)
end = int(time.time() * 1000)
start = end - 200 * 24 * 60 * 60 * 1000 # 200 days of 1h candles = 4,800 rows (only the latest 5,000 exist)
rows = info.candles_snapshot("BTC", "1h", start, end)
with open("btc_1h.csv", "w", newline="") as fh:
w = csv.writer(fh)
w.writerow(["open_time_ms", "open", "high", "low", "close", "volume", "trades"])
for c in rows:
w.writerow([c["t"], c["o"], c["h"], c["l"], c["c"], c["v"], c["n"]])
print(len(rows), "candles written") When 5,000 bars are not enough at a short interval, there is no official archive to fall back on: the S3 buckets contain no candles. Your options are to build bars from fills (node_fills_by_block), start a recorder now, or buy history from a provider. For live bars, subscribe to the candle WebSocket feed instead of polling.
3. Trades and fills
Public trades are the thinnest data set in the API. recentTrades returned only 10 BTC trades on October 14, 2026, each with coin, side, px, sz, time, hash, tid and users (buyer and seller addresses). There is no paging back. The WebSocket trades feed is the real source: in our 63-second recording on October 14, 2026 (14:02–14:03 UTC) it delivered 366 BTC prints in 165 messages, after a first message replaying 30 recent prints. Side "B" means the buyer was the aggressor, "A" the seller; key trades on (time, coin, tid) because tid is a hash.
Your own fills are better served: userFills returns up to 2,000 per response and userFillsByTime pages by time, but only the latest 10,000 fills of an address exist at all. Each fill carries fee (negative = rebate), crossed (true = taker), closedPnl and an optional builderFee. If a bot of yours trades more than that, store fills as they arrive (WebSocket userFills). For a no-code export of an account's history, see the Hyperliquid trade history CSV guide; to check a single fill by hand, use the Hyperliquid explorer.
All fills, all users, back in time are only in S3: s3://hl-mainnet-node-data/node_fills_by_block holds every fill streamed from a non-validating node, in the same format as the API (older periods sit in node_fills and, in a different format, node_trades).
4. Order book: L2 snapshots and order-level (L4) data
l2Book (weight 2) returns the current book, 20 levels per side, each level {px, sz, n} with n the number of orders. Add nSigFigs to aggregate prices for a wider view: on October 14, 2026 the BTC book at 2 significant figures ran from $82,000 down to $63,000 on the bid side, against a one-dollar spread at full precision.
curl
# Full-precision book: 20 levels per side, each {px, sz, n}
curl -s -X POST https://api.hyperliquid.xyz/info -H "Content-Type: application/json" \
-d '{"type":"l2Book","coin":"BTC"}'
# Wider view: aggregate prices to 2 significant figures (valid: 2, 3, 4, 5; mantissa 1/2/5 only with 5)
curl -s -X POST https://api.hyperliquid.xyz/info -H "Content-Type: application/json" \
-d '{"type":"l2Book","coin":"BTC","nSigFigs":2}' There is no book history in the API. The official archive has hourly L2 snapshots per coin in s3://hyperliquid-archive/market_data, enough for depth and spread studies, not for queue-position or fill simulation. For that you need every update: the WebSocket l2Book feed sends full snapshots (replace, never merge), with fast: true giving 5 levels about every half second, and bbo fires whenever the top of book changes. Order-level ("L4") books, with individual orders rather than aggregated levels, are not part of the public API. The node docs (L1 data schemas, read October 14, 2026) describe how a non-validating node writes node_order_statuses and node_raw_book_diffs hourly and can compute an L4 snapshot to apply that stream to; vendors also sell L4 streams, such as Dwellir's order-book server (from $199 a month, checked September 26, 2026).
5. Liquidations
There is no public endpoint for market-wide liquidation history. What exists, per the WebSocket docs read on October 14, 2026:
- Your own liquidations: a fill can carry a
liquidationobject (liquidatedUser,markPx,method:"market"or"backstop");userEventspushes aliquidationevent anduserNonFundingLedgerUpdateslists liquidations with the positions closed. - Everyone's liquidations, historically: parse the fills in
node_fills_by_blockon S3 for the liquidation field. - Where liquidations cluster now: that is an estimate from open positions, not a history; see the Hyperliquid liquidation map guide.
6. Funding rate history
Funding is the one market data set with deep history in the free API. fundingHistory takes a coin and a start time and returns up to 500 hourly rows (coin, fundingRate, premium, time) per call; on October 14, 2026 BTC went back to May 12, 2023. Page forward one millisecond after the last row. On October 4, 2026 this pulled 60 days of BTC funding (1,440 rows) in three calls:
Python — paginate funding history
import time
from hyperliquid.info import Info
from hyperliquid.utils import constants
info = Info(constants.MAINNET_API_URL, skip_ws=True)
start = int(time.time() * 1000) - 60 * 24 * 60 * 60 * 1000 # 60 days of hourly funding = 1,440 rows
rows = []
while True:
page = info.funding_history("BTC", start) # at most 500 rows per call
rows += page
if len(page) < 500:
break
start = page[-1]["time"] + 1 # next page starts after the last row
print(len(rows), "funding rows; latest", rows[-1]["fundingRate"]) Related requests: predictedFundings (next rates on Hyperliquid and other venues), userFunding (your own payments, same 500-row paging) and the userFundings WebSocket feed. What a rate means for a position, and how it compares with other venues, is in crypto funding rates explained.
7. Open interest: metaAndAssetCtxs (current) and asset_ctxs (history)
POST {"type":"metaAndAssetCtxs"} to the info endpoint (weight 20, no key) for every perp market's open interest, funding, mark, oracle and mid price, premium and 24-hour volume in one call. The response is a two-element array: the market list (universe) and the asset contexts in the same order. Add "dex":"xyz" for a HIP-3 DEX: "xyz" (trade.xyz) listed 135 markets (delisted ones included) and perpDexs named 10 HIP-3 DEXs on October 14, 2026.
curl
# Every perp market's open interest, funding and prices in one call (weight 20)
curl -s -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type":"metaAndAssetCtxs"}'
# The same for a HIP-3 perp DEX, e.g. trade.xyz's stock and index perps
curl -s -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type":"metaAndAssetCtxs","dex":"xyz"}' | Field | Meaning | BTC, Oct 4, 2026 |
|---|---|---|
| openInterest | Open interest in coins (base units), not USD. Multiply by markPx for a USD figure | 37872.65 (BTC) |
| funding | Current hourly funding rate as a decimal (0.0000125 = 0.00125% an hour) | 0.0000125 |
| markPx / oraclePx / midPx | Mark price (used for margin and liquidations), oracle price, book mid | 85378.0 / 85400.0 / 85378.5 |
| premium | Premium of the impact bid/ask prices over the oracle price, sampled into the hourly funding rate | -0.0002459016 |
| dayNtlVlm / dayBaseVlm | 24-hour volume in USD and in coins | 650802296.16 / 7654.49 |
| prevDayPx | Price 24 hours ago (for a 24 h change) | 84798.0 |
openInterest is in coins, not dollars: multiply by markPx. This ranks live markets by open interest:
Python — oi.py
from hyperliquid.info import Info
from hyperliquid.utils import constants
info = Info(constants.MAINNET_API_URL, skip_ws=True)
meta, ctxs = info.meta_and_asset_ctxs() # weight 20: every perp market in one call
rows = []
for asset, ctx in zip(meta["universe"], ctxs): # ctxs[i] belongs to universe[i]
if asset.get("isDelisted"):
continue
oi_coins = float(ctx["openInterest"]) # open interest in coins, not USD
oi_usd = oi_coins * float(ctx["markPx"])
rows.append((asset["name"], oi_usd, float(ctx["funding"]) * 100, ctx["markPx"]))
for name, oi_usd, funding_pct, mark in sorted(rows, key=lambda r: -r[1])[:5]:
print(f"{name:5} OI {oi_usd / 1e9:.2f}B USD | funding {funding_pct:.5f}% per hour | mark {mark}") Output on October 4, 2026, 15:25 UTC
ETH OI 3.28B USD | funding 0.00125% per hour | mark 2698.73 BTC OI 3.23B USD | funding 0.00125% per hour | mark 85285.0 HYPE OI 1.83B USD | funding 0.00125% per hour | mark 89.863 SOL OI 0.67B USD | funding 0.00077% per hour | mark 121.64 ZEC OI 0.61B USD | funding 0.00217% per hour | mark 1332.2743
The API keeps no open-interest history. The daily files in s3://hyperliquid-archive/asset_ctxs/ do, or snapshot metaAndAssetCtxs on a schedule (one call every minute is 20 of your 1,200 weight). For a ready-made live table, see our Hyperliquid markets data page; for reading OI across venues, the perp DEX open interest guide.
8. Record the WebSocket yourself
For anything the API does not keep (tick trades, book updates, intraday OI), the cheapest archive is your own. This recorder needs nothing but Node 22: it subscribes to BTC trades, the fast book and the asset context, pings every 50 seconds (the server closes a connection after 60 seconds without a message) and reconnects with jittered backoff. Run for 20 seconds on October 14, 2026 it wrote 56 trades, 38 book and 20 asset-context messages to one JSONL file.
JavaScript — record.mjs (Node 22+)
// record.mjs: Node 22+, no dependencies. Appends every message to one JSONL file per UTC day.
import { appendFileSync } from "node:fs";
const URL = "wss://api.hyperliquid.xyz/ws";
const SUBS = [
{ type: "trades", coin: "BTC" },
{ type: "l2Book", coin: "BTC", fast: true }, // 5 levels per side, about every 0.5 s
{ type: "activeAssetCtx", coin: "BTC" }, // mark, funding, open interest
];
let backoff = 1000;
function connect() {
const ws = new WebSocket(URL);
let hb;
ws.onopen = () => {
backoff = 1000;
for (const s of SUBS) ws.send(JSON.stringify({ method: "subscribe", subscription: s }));
hb = setInterval(() => ws.send(JSON.stringify({ method: "ping" })), 50_000);
};
ws.onmessage = (ev) => {
const day = new Date().toISOString().slice(0, 10);
appendFileSync("hl-" + day + ".jsonl", JSON.stringify({ recv: Date.now(), msg: JSON.parse(ev.data) }) + "\n");
};
ws.onclose = () => {
clearInterval(hb);
setTimeout(connect, backoff + Math.random() * 1000); // reconnect with jitter, then re-subscribe
backoff = Math.min(backoff * 2, 60_000);
};
ws.onerror = () => ws.close();
}
connect(); Run it under a process manager on a small VPS, compress each day's file, and you will have the data set no API returns. Limits per IP: 1,000 subscriptions and 10 unique users across user-specific feeds, so a recorder following many wallets needs several IPs or a node. On reconnect, time-series feeds start with an isSnapshot: true message; de-duplicate on (time, tid) for trades.
9. Hyperliquid S3 archives: bucket layout
From the official historical data page (read October 14, 2026). The buckets are requester pays: you need an AWS account and pay the transfer. hyperliquid-archive is uploaded "approximately once a month", and the docs warn there is "no guarantee of timely updates and data may be missing". There are no candles and no spot data in S3. Files are LZ4-compressed.
| Path | Contents |
|---|---|
| s3://hyperliquid-archive/market_data/[date]/[hour]/l2Book/[coin].lz4 | Hourly L2 order-book snapshots per coin |
| s3://hyperliquid-archive/asset_ctxs/[date].csv.lz4 | Daily asset contexts: funding, open interest, mark and oracle prices |
| s3://hl-mainnet-node-data/node_fills_by_block | Every fill, batched by block (API fill format); older: node_fills, node_trades |
| s3://hl-mainnet-node-data/misc_events_by_block | Non-trade events: transfers, staking, funding payments |
| s3://hl-mainnet-node-data/explorer_blocks · replica_cmds | Explorer blocks and raw L1 transactions |
Shell — AWS CLI + lz4
# Hourly L2 book snapshots (requester pays the S3 transfer; files are LZ4-compressed) aws s3 cp s3://hyperliquid-archive/market_data/20230916/9/l2Book/SOL.lz4 . --request-payer requester unlz4 --rm SOL.lz4 && head -c 400 SOL # Daily asset contexts (funding, open interest, prices) for one date aws s3 cp s3://hyperliquid-archive/asset_ctxs/20230916.csv.lz4 . --request-payer requester # See what exists before you pay for transfers aws s3 ls s3://hl-mainnet-node-data/node_fills_by_block/ --request-payer requester
Paths and commands as documented; we did not download from the buckets for this guide. There is no official Parquet: convert after download, or buy converted files from a provider below.
10. Third-party Hyperliquid data providers
Paid providers sell convenience (normalised files, tick depth, query APIs), not access. Prices as published on the dates shown; we have no commercial relationship with any of them.
| Source | What | Cost | Checked |
|---|---|---|---|
| Hyperliquid S3 (official) | L2 snapshots, asset contexts, fills, blocks | Free data, you pay AWS transfer | Monthly uploads, "no guarantee of timely updates" |
| Tardis.dev | Raw WebSocket channels (book, trades, asset contexts) since October 29, 2024 | Paid API; first day of each month as free CSV | Read Oct 14, 2026 |
| Dwellir | OHLCV candles and fills APIs, CSV/Parquet exports, archive datasets | API plans from $49/month; exports per credit | Read Oct 14, 2026 |
| HypeRPC | Replica of the public API, 12,000 REST weight a minute | $1,999/month | Checked September 26, 2026 |
Notes from the providers' own pages (October 14, 2026): Tardis.dev collects in Tokyo (GCP asia-northeast1), records the raw WebSocket channels with local timestamps, and its trade history from December 1, 2024 includes buyer and seller addresses; HIP-3 symbols start December 2, 2025. Dwellir's candle API bills one credit per returned candle and its full-history exports come as CSV or Parquet at 1-second, 1-minute or 5-minute intervals. Before you pay, check whether the free daily candles and funding history already answer your question; for many swing-trading backtests they do.
11. Rate limits for bulk pulls
Everything above shares one per-IP budget of 1,200 weight per minute. Most info requests weigh 20; candleSnapshot adds weight per 60 candles returned and list requests such as fundingHistory, recentTrades and userFills per 20 items. By our reading of the docs, one full 5,000-candle pull costs about 104 weight and one 500-row funding page about 45, so one IP manages about 11 full candle pulls a minute and a backfill of every market at one interval takes a while. Space requests out, back off on HTTP 429, and move anything live to the WebSocket. The full limit table is in the API guide.
Data first, then a funded account
Reading data needs no account. API orders do: they need a funded master account and an API wallet. Join with code HOLYGRAIL before your first deposit and fees drop 4% for your first $25M of volume on fills from your master account, API orders included (sub-accounts and vaults are excluded).
12. From data to a backtest
Once the series is on disk, the hard part is honesty: fees per fill, hourly funding, slippage against the real book and no look-ahead. Our walkthrough on how to backtest a Hyperliquid strategy covers each one. When the strategy is ready to trade, the Hyperliquid API quickstart takes you from an API wallet to a first post-only order on testnet, and the Hyperliquid fees guide has the schedule your backtest should charge.
FAQ
Is there an API to access Hyperliquid historical data?
Yes, partly for free. The public info endpoint (POST https://api.hyperliquid.xyz/info, no key) returns candles through candleSnapshot (the latest 5,000 per coin and interval, which covers the whole history on the daily interval), funding-rate history back to May 12, 2023 for BTC through fundingHistory and your own fills, orders and funding payments. Order books, open interest and public trades are current-only in the API; for those, Hyperliquid's S3 archives (requester pays) hold hourly L2 snapshots, daily asset contexts and every fill, or you record the WebSocket yourself.
How far back does Hyperliquid candle data go?
The info endpoint keeps the most recent 5,000 candles per coin and interval: about 3.5 days of 1-minute candles, 52 days of 15-minute, 208 days of 1-hour and 2.3 years of 4-hour candles. Daily candles cover everything: on October 14, 2026 BTC returned 2,248 daily bars from August 19, 2020, but the first 921 carry prices with zero volume and zero trades, from before Hyperliquid listed BTC. Real BTC trading on Hyperliquid starts February 26, 2023. Filter on n > 0 for backtests.
Does Hyperliquid have historical order book data?
Not through the API: l2Book and the l2Book WebSocket feed return the current book only. Hyperliquid uploads hourly L2 book snapshots per coin to s3://hyperliquid-archive/market_data (requester pays, roughly monthly, with no guarantee of completeness). Tick-level book history (every update, or the 5-level fast book) comes from paid providers such as Tardis.dev, or from your own recorder.
How do I get Hyperliquid funding rate history?
POST {"type":"fundingHistory","coin":"BTC","startTime":<ms>} to the info endpoint. Each call returns up to 500 hourly rows (coin, fundingRate, premium, time); start the next call one millisecond after the last row. On October 14, 2026 BTC funding history went back to May 12, 2023. HIP-3 markets take their DEX prefix, for example "xyz:XYZ100".
Is Hyperliquid historical data free?
The API is free: no key, no subscription, only the per-IP budget of 1,200 weight per minute. The official S3 archives are free data, but the bucket is requester-pays, so you pay AWS transfer costs. Third parties charge for convenience and depth: Tardis.dev for tick data, Dwellir for candle and fill APIs (plans from $49 a month on October 14, 2026).
How do I download my own Hyperliquid trade history?
Your fills come from userFills or userFillsByTime (2,000 per response; only the latest 10,000 are kept). For a spreadsheet export without code, see our trade-history CSV guide; the official docs also link a third-party exporter maintained by the Enigma team.
API orders need a funded account
Join with HOLYGRAIL before the first deposit: the code can only be added before the account passes $10,000 of volume, and it applies to fills from your master account, API orders included, for the first $25M (sub-accounts and vaults are excluded).
Disclosure: HOLYGRAIL is our Hyperliquid referral code; we earn a share of referred accounts' fees at no cost to you. Limits and depths were read from Hyperliquid's official docs and the live API on October 14, 2026; history windows roll forward daily. We have no relationship with the data providers named. Nothing here is trading advice.