Backtesting on Hyperliquid
You can backtest and optimize crypto strategies on Hyperliquid perpetuals and
spot pairs. Market ids look like HYPERLIQUID.PERP.<COIN> and
HYPERLIQUID.SPOT.<BASE>USDC.
Fees
- Perpetuals: 0.045% taker fee on every fill by default.
- Spot: 0.07% taker fee by default. On a buy, the fee is taken in the coin you buy, so you receive slightly less of it. On a sell, the fee is taken in USDC.
- Any commission you set replaces the default.
- The minimum order is 10 USDC. Smaller orders are skipped with a warning.
Leverage
- Runs start at 1x.
- On perpetuals you can change the leverage in the run settings.
- Spot is always 1x and long-only.
Funding (perpetuals)
Funding is applied every hour, on the position you hold at the top of the hour, at Hyperliquid's settled rate. Long positions pay when the rate is positive and receive when it is negative.
Margin and liquidation (perpetuals)
- Margin is isolated.
- Liquidation uses the mark price and Hyperliquid's maintenance tiers for the coin.
- The mark price is per minute, so a move that starts and ends inside one minute does not trigger a liquidation.
Which coins you can test
Only coins listed on Hyperliquid today can be backtested. Coins that were delisted are not available, so results over long periods can look better than the whole market did (survivorship bias).
Historical runs use today's order rules for the coin (price grid, size step). If a coin's size rules changed in the past, days before the change can be refused.
Tick runs
A Tick run fills your orders on the recorded trades, one by one, instead of on bars. It is slower and has limits on how much data one run can read.
Data history
Spot order rules are recorded from 2026-11-11; earlier spot days use today's rules.
Paper bots
You can deploy a Hyperliquid strategy as a paper bot: it runs on the live Hyperliquid feed with a simulated USDC account, and no order reaches Hyperliquid. Funding is applied every hour on perpetual paper bots.
Perpetual paper bots run an ordinary impl Strategy strategy (not
CryptoStrategy); spot paper bots run a CryptoStrategy (rq_sdk::crypto).
A spot paper bot is deployed from a 1m Tick backtest of the same pair.