Short answer
freqtrade download-data cannot fetch Hyperliquid history, so write the files yourself: the candles for your timeframe, a 1h candle file (Freqtrade uses Hyperliquid's 1h futures candles as the mark price) and a 1h funding-rate file, all as feather in user_data/data/hyperliquid/futures/. Then freqtrade backtesting runs over as many months as you have candles. The script below takes the candles from TikTape and the funding rates from Hyperliquid's free fundingHistory.
What Freqtrade expects
File (pair BTC/USDC:USDC) | Columns | Why |
|---|---|---|
BTC_USDC_USDC-5m-futures.feather | date, open, high, low, close, volume | The strategy timeframe |
BTC_USDC_USDC-1h-futures.feather | Same | Mark price: Freqtrade's Hyperliquid class sets mark_ohlcv_price to futures. Without it backtesting stops with No data found. Terminating. |
BTC_USDC_USDC-1h-funding_rate.feather | date, funding_rate | Funding fees on open positions |
date must be a UTC datetime column, not integer milliseconds. Sources: Freqtrade data download, Freqtrade exchange notes ("downloading data is not possible" for Hyperliquid), and freqtrade/exchange/hyperliquid.py and data/history/datahandlers/idatahandler.py in the Freqtrade source.
Script: write the three files
import os, pathlib, time
import pandas as pd
import requests
KEY = os.environ["TIKTAPE_API_KEY"]
OUT = pathlib.Path("user_data/data/hyperliquid/futures")
STEP_MS = {"1m": 60_000, "5m": 300_000, "15m": 900_000, "1h": 3_600_000}
def candles(coin, interval, start_ms, end_ms):
"""OHLCV from TikTape, 10,000 candles per request."""
rows, cursor = [], start_ms
while cursor < end_ms:
stop = min(end_ms, cursor + 10_000 * STEP_MS[interval])
r = requests.get("https://tiktape.xyz/api/v1/ohlcv", headers={"X-API-Key": KEY}, timeout=60,
params={"coin": coin, "interval": interval, "startTime": cursor, "endTime": stop, "limit": 10_000})
r.raise_for_status()
rows += r.json()["data"]
cursor = stop
df = pd.DataFrame(rows, columns=["date", "open", "high", "low", "close", "volume"])
df["date"] = pd.to_datetime(df["date"], unit="ms", utc=True)
return df.astype({c: "float64" for c in ["open", "high", "low", "close", "volume"]})
def funding(coin, start_ms, end_ms):
"""Hourly funding from Hyperliquid's free fundingHistory, 500 rows per call."""
rows = []
while start_ms < end_ms:
page = requests.post("https://api.hyperliquid.xyz/info", timeout=30, json={
"type": "fundingHistory", "coin": coin, "startTime": start_ms, "endTime": end_ms}).json()
rows += page
if len(page) < 500:
break
start_ms = page[-1]["time"] + 1
time.sleep(0.2)
df = pd.DataFrame({"date": pd.to_datetime([r["time"] for r in rows], unit="ms", utc=True).floor("h"),
"funding_rate": [float(r["fundingRate"]) for r in rows]})
return df.drop_duplicates("date")
coin, pair = "BTC", "BTC_USDC_USDC" # Freqtrade pair BTC/USDC:USDC
start = int(pd.Timestamp("2025-10-01", tz="UTC").timestamp() * 1000)
end = int(pd.Timestamp("2025-11-01", tz="UTC").timestamp() * 1000)
OUT.mkdir(parents=True, exist_ok=True)
candles(coin, "5m", start, end).to_feather(OUT / f"{pair}-5m-futures.feather")
candles(coin, "1h", start, end).to_feather(OUT / f"{pair}-1h-futures.feather") # mark price
funding(coin, start, end).to_feather(OUT / f"{pair}-1h-funding_rate.feather")
Run the backtest
Use a futures config with "trading_mode": "futures", "margin_mode": "isolated", "stake_currency": "USDC" and "exchange": {"name": "hyperliquid", "pair_whitelist": ["BTC/USDC:USDC"]}, then:
freqtrade backtesting -c config.json --strategy MyStrategy --timeframe 5m --timerange 20251001-20251101
We ran exactly this with Freqtrade 2026.11 on 2026-12-03: it loaded 30 days of 5m candles, and the trades carried funding fees from the funding file. For a longer test, widen start and end; one TikTape request returns about 35 days of 5m candles. Why the built-in download stops at 5,000 candles is covered in CCXT and Freqtrade history.