How to backtest a Hyperliquid strategy in plain English
Type the idea as one sentence. Your own sandbox turns it into a bot file, backtests it on the last 90 days of Hyperliquid data with fees, funding and slippage, and keeps the last 30% of those days unseen. No signup and no code.
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#
- Go to ironflow.sh, type your idea, press Test it.
- A sandbox starts in Tokyo and writes the idea as
bot.yaml. - It backtests the last 90 days up to yesterday and prints the result.
- Edit the file and run it again, or get a free key to test a full year.
1. Write the idea#
A bot is one market, one direction, a size, one or more conditions and its exits. Say each part in plain words:
buy $1k of BTC after longs lose $3M in an hour
short $1k of ETH when funding is above 0.003% an hour
buy $1k of HYPE after a 5% drop in 4 hours
short $1k of ETH when funding is above 0.002% an hour and open interest is up 1% in 24 hoursWhat a condition can test:
- Price move: percent change over the last N hours.
- Liquidations: USD of longs, shorts or both liquidated within N minutes.
- Funding: the hourly rate above or below a level.
- Open interest: percent change over the last N hours.
- Taker flow and volume: taker buys against taker sells, or volume against its own average, by the hour.
Join conditions with "and" or "or". Add a stop loss, a take profit, a time exit and a size.
Leave something out and the box fills a default and tells you: $100 a trade, a 2% stop, a 3% take profit, close after 24 hours, a $1,000 cap per position and a 3% daily stop.
2. Check what it understood#
The box prints one line per setting, for example "Opens a long of $1,000." and "Closes at a 2% loss, the default stop." If part of the idea cannot be tested from market data, such as a tweet, a headline or another exchange, it says so under "Cannot test" and builds the bot from the rest.
The first idea above becomes a bot with these settings. This is the file we ran, with a name added:
name: btc-long-liqs
market: BTC
when:
all:
- liquidations: {side: long, min_usd: 3000000, minutes: 60}
action: {buy_usd: 1000}
exits: {stop_pct: 2, take_pct: 3, max_hours: 24}
risk: {max_usd: 1000, daily_stop_pct: 3}3. Read the result#
This is the real output for that file, 90 days of data to 1 November 2026:
BTC-PERP btc-long-liqs 90 days to 2026-11-01
Fills are estimated. We have no order book history.
Costs per side: 4.5 bps fee, 0.5 bps slippage
(BTC-PERP, from 30 days of Hyperliquid trades).
Funding included. Start $10,000.
Entries use the next bar or event after a signal.
Tested 2026-08-03 to 2026-10-05 (63 days)
Net PnL +$24.20
Before costs +$56.57
Fees -$24.32
Slippage -$2.70
Funding -$5.34
Max drawdown $48.91 (0.5%)
Trades 27, win rate 48.1% of 27
Random median +$68.01, middle 90% -$78.57 to +$259.41, 1000 runs. This bot beat 32%.
Holdout 2026-10-05 to 2026-11-01 (27 days)
Net PnL -$133.33
Before costs -$116.85
Fees -$12.55
Slippage -$1.39
Funding -$2.53
Max drawdown $157.28 (1.6%)
Trades 14, win rate 28.6% of 14
Random median -$52.55, middle 90% -$125.22 to +$19.50, 1000 runs. This bot beat 3%.
Holdout days ran fresh and were not used in the tested period. Changing the bot after reading them makes them tested days too.How to read it:
- Costs. Every trade pays a 4.5 bps taker fee and the market's own slippage on each side, plus funding for every hour it is open. Slippage is measured from 30 days of Hyperliquid trades: 0.5 bps on BTC, 5 bps on a market with too few trades. Before costs is the result without all three. A fill uses a later price than the signal: the next bar, or a liquidation print at least 3 seconds later.
- Tested and Holdout. The 90 days are split. The bot trades the first 63 days from a fresh $10,000 account, then the last 27 days from another fresh account. The tested run never sees the holdout days.
- Random. The same trades, with the same sizes, directions and holding times, placed at random times 1,000 times. "Beat 32%" means 68% of random runs did better.
- Small samples. Under 10 trades, the box lists each trade and says the sample is too small to judge.
Here the bounce trade made money on the tested days, then lost on the unseen days and did worse than 97% of random runs. That is the point of testing first: this lesson cost nothing.
4. Change one thing and run it again#
The bot is a file in your sandbox. Open it, change a level, run it again:
nano bot.yaml
ironbox backtest bot.yamlChange one thing at a time. Once you have read the holdout, every change you make after it turns those days into tested days too. The box reminds you of this under every result.
5. Test further back#
Ninety days is often too short for a rare signal. With a free key the box reaches a year of history. Set the key in the sandbox's shell, then sync and test:
export IRONFLOW_API_KEY=if_your_key
ironbox data sync --days 365 --market BTC
ironbox backtest bot.yaml --days 365The same idea over a year, 1 November 2025 to 31 October 2026:
| Period | Net PnL | Trades | Won | Beat random |
|---|---|---|---|---|
| Tested, 256 days | -$304.85 | 171 | 43.3% | 67% |
| Holdout, 110 days | -$122.89 | 47 | 40.4% | 10% |
In the tested period fees cost $153.84, slippage $17.09 and funding $14.58. It lost before those costs too (-$119.34), so cheaper execution would not have saved it.
Prefer code?#
Boot an empty sandbox and write bot.py with one function, on_event(e, ctx). It gets every candle, liquidation, funding and open interest event and calls ctx.buy(usd=), ctx.sell(usd=) or ctx.close(). The backtest is the same, with the same costs, holdout and random runs. For raw data and your own simulator, see How to backtest on Hyperliquid.
Questions#
Do I need to sign up?#
No. Type an idea and the sandbox starts. A free key lets the box test a full year of history.
Do I need to write code?#
No. The sentence becomes bot.yaml, which you can read and edit. Code is there when you want it.
What data does it use?#
Ironflow's own Hyperliquid data: hourly candles, every liquidation, hourly funding and open interest, and hourly taker flow and volume.
Which markets?#
Any Hyperliquid perp, including HIP-3 markets such as xyz:NVDA.
Can it test news or tweets?#
No. It tests price, liquidations, funding, open interest, taker flow and volume, and it tells you which part of an idea it left out.
Related guides#
- Hyperliquid funding rate: what is normal and what is a spike
- How to backtest on Hyperliquid: data, fees and code
- Hyperliquid paper trading
- Hyperliquid liquidation data
Test your trading idea before it costs you money. Type it on ironflow.sh
Past results do not predict future ones. Not financial advice.
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.