Freqtrade on Hyperliquid: backtest past 5,000 candles
Freqtrade's own Hyperliquid notes say it: Hyperliquid only offers 5,000 historic candles, so a backtest is limited to the last 5,000. Write longer history into Freqtrade's data folder and backtest as usual: free hourly candles and funding since May 2025, or 1m to 30m bars with a free key.
- FILE
- huggingface.co/datasets/ironflow/hyperliquid-candles-1h free, hourly
- API
- GET https://api.ironflow.sh/v1/candles?market=BTC-PERP&interval=5m
- HOW
- docs.ironflow.sh/guides/freqtrade-hyperliquid-historical-data
Free key14 days of history at 60 requests a minute. Without a key, the API reaches 24 hours back.
By requesting a key you agree to the Terms and API terms; see the Privacy Policy. We may email you when your key keeps hitting its limits; you can opt out at any time.
The short version#
- The cap:
freqtrade download-datagets at most the newest 5,000 candles from Hyperliquid. At 1h that is about 208 days. - The fix: write candles and funding from another source as Freqtrade feather files, then run
freqtrade backtestingas usual. - How much: 12,586 free hourly BTC candles since 25 May 2025, 2.5 times the exchange's 5,000.
Why Freqtrade stops at 5,000#
Hyperliquid's candleSnapshot keeps only the most recent 5,000 candles per interval (info endpoint). Freqtrade sets ohlcv_has_history to False for Hyperliquid, and its exchange notes say backtests will either need to build candles over time or be limited to the last 5,000.
| Timeframe | 5,000 candles reach back |
|---|---|
| 1m | About 3.5 days |
| 5m | About 17 days |
| 15m | About 52 days |
| 1h | About 208 days |
| 4h | About 833 days |
What to load instead#
| Source | Covers | Size | Access |
|---|---|---|---|
| Free hourly candles | 25 May 2025 to 31 Oct 2026 | 12,586 BTC candles | No key |
| Free funding | May 2023 to Oct 2026 | Hourly rates | No key |
| /v1/candles, free key | Last 14 days | 20,160 1m candles | 60 requests a minute |
| /v1/candles, Explorer | Last 90 days | 1m to 1w | $49 for 30 days |
| /v1/candles, Builder | Last year | 1m to 1w | $149 for 30 days |
Check the data#
Count what the free hourly file holds, no key:
import pandas as pd
URL = "https://huggingface.co/datasets/ironflow/hyperliquid-candles-1h/resolve/main/data/{}.parquet"
months = pd.period_range("2025-05", "2026-10", freq="M").strftime("%Y-%m")
candles = pd.concat(pd.read_parquet(URL.format(m)) for m in months)
btc = candles[candles.coin == "BTC"]
print(len(btc), "hourly BTC candles from", btc.timestamp.min(), "to", btc.timestamp.max())12586 hourly BTC candles from 2025-05-25 14:00:00+00:00 to 2026-10-31 23:00:00+00:00Load it into Freqtrade#
The Freqtrade guide in our docs has two scripts: free hourly candles and funding with no key, and 1m to 30m bars from /v1/candleswith a key. Both write with Freqtrade's own data handler to user_data/data/hyperliquid/futures, pairs named BTC/USDC:USDC. After the hourly script, with Freqtrade 2026.10:
freqtrade list-data --datadir user_data/data/hyperliquid --trading-mode futures --show-timerange┃ Pair ┃ Timeframe ┃ Type ┃ From ┃ To ┃ Candles ┃
│ BTC/USDC:USDC │ 1h │ funding_rate │ 2025-06-01 00:00:00 │ 2026-10-31 23:00:00 │ 12432 │
│ BTC/USDC:USDC │ 1h │ futures │ 2025-06-01 00:00:00 │ 2026-10-31 23:00:00 │ 12432 │
│ ETH/USDC:USDC │ 1h │ funding_rate │ 2025-06-01 00:00:00 │ 2026-10-31 23:00:00 │ 12432 │
│ ETH/USDC:USDC │ 1h │ futures │ 2025-06-01 00:00:00 │ 2026-10-31 23:00:00 │ 12432 │- In your config:
"trading_mode": "futures", amargin_mode(Freqtrade supports isolated and cross on Hyperliquid) and"stake_currency": "USDC". - Then run
freqtrade backtestingwith a--timerangeinside those dates. - To test the same idea without Freqtrade, see how to backtest on Hyperliquid.
Questions#
Why can't Freqtrade download Hyperliquid history?#
Hyperliquid's candleSnapshot keeps only the most recent 5,000 candles per interval, and Freqtrade marks Hyperliquid as having no OHLCV history. Freqtrade's docs say a backtest is limited to the last 5,000 candles unless you build the candles yourself over time.
How do I backtest Freqtrade on Hyperliquid for more than 5,000 candles?#
Write longer history into Freqtrade's data folder as futures and funding_rate feather files, then run freqtrade backtesting as usual. Ironflow's free hourly candles reach back to 25 May 2025: 12,586 BTC candles, against 5,000 from the exchange.
Can I get 1m or 5m Hyperliquid candles for Freqtrade?#
Yes, from GET https://api.ironflow.sh/v1/candles with a key. A free key covers 14 days, which is 20,160 1m candles. Explorer covers 90 days and Builder one year.
Does the backtest include Hyperliquid funding?#
Yes, if you write the funding_rate file too. The free funding dataset has hourly rates from May 2023, and the docs guide stores them next to the candles.
Related guides#
- Hyperliquid candles and OHLCV data: the 5000 candle limit and older history
- How to backtest on Hyperliquid
- How to build a Hyperliquid trading bot in Python
References#
- Freqtrade docs: Hyperliquid. The 5,000 candle note.
- Hyperliquid docs: Info endpoint. candleSnapshot and its 5,000 candle limit.
- Hugging Face: ironflow/hyperliquid-candles-1h. The free hourly candles.
- Hugging Face: ironflow/hyperliquid-funding. The free hourly funding rates.
For 1m to 30m bars, get a free key: 14 days, by email, no card.
Free key14 days of history at 60 requests a minute. Without a key, the API reaches 24 hours back.
By requesting a key you agree to the Terms and API terms; see the Privacy Policy. We may email you when your key keeps hitting its limits; you can opt out at any time.