Hyperfolio
Guide

Hyperliquid Grid Trading Strategy: 30-Day Backtest (2026)

Grid trading on Hyperliquid with real data: how a grid works, setup with Scale orders or the API, maker fees vs funding, and a 30-day backtest on BTC, ETH, SOL and HYPE.

November 24, 202614 min

The short version: a grid places buy orders below the price and sell orders above it, and earns one grid step each time price bounces between two levels. We replayed a 20-level long grid, range ±10%, $10,000 on BTC, ETH, SOL and HYPE over the last 30 days of Hyperliquid 15-minute candles (snapshot 24 November 2026, 08:14 UTC). The grids completed 23 to 100 round trips and realized $125 to $788 of grid profit, but every one ended in loss (−$736 to −$2,548 before costs) because prices fell 16% to 30% and the grid kept buying all the way down. Grids beat buy & hold here only because they start half in cash; against a simple 50/50 hold they lost on BTC, ETH and SOL and roughly tied on HYPE.

Grid trading is one of the most popular automated strategies on order-book exchanges, and Hyperliquid's central limit order book, low maker fees and public API make it a natural place to run one. It is also one of the most misunderstood: the grid profit you see on a bot dashboard is not your PnL. This guide explains how a grid works, how to set one up on Hyperliquid, what fees and funding really cost, and what happened when we ran the strategy on real data.

How a grid trading strategy works

You pick a price range (a lower and an upper bound) and split it into equal steps. In our test the range is ±10% around the start price, split into 20 steps, so each step is 1% of the start price.

  • Below the current price the grid rests buy limit orders, one per level.
  • Above the current price it holds the coin it needs to sell one step higher.
  • When a buy fills, the grid places a sell one step above it. When that sell fills, it places a buy one step below again. Each buy-then-sell pair is a round trip that earns one step (about 1% of the order size here) minus fees.

The catch is inventory. If the price falls through the whole range, every buy fills and no sell does: you end up fully in the coin, bought at progressively lower prices, with a loss close to buy & hold. If the price rises above the range, everything is sold and you sit in USDC, missing the rest of the move. A grid makes money in a sideways, choppy market inside its range and nowhere else.

How to run a grid on Hyperliquid

  • Scale orders (manual). The Hyperliquid interface has no built-in grid bot, but the Scale order type places several limit orders across a price range in one go. You can ladder buys below the price and sells above it, then re-place them by hand as they fill. See our order types guide.
  • Your own script. The API lets you place and cancel limit orders and listen to fills over WebSocket, which is all a grid needs. Use a dedicated API wallet that can trade but not withdraw. Start with our Python API guide and watch the rate limits if you run many levels.
  • Third-party bots. Several bot platforms support Hyperliquid. Compare what they charge and what permissions they ask for in our trading bots guide.

Whatever you use, place grid orders as post-only (ALO) so they always pay the maker fee and never cross the spread.

The parameters that decide the result

  • Range width. Too narrow and the price leaves the range quickly; too wide and fills are rare. A common starting point is the recent volatility: our ATR and volatility guide shows how to measure it.
  • Number of levels. More levels mean smaller steps, more fills and more fee volume. The step must be clearly larger than two maker fees: on perps at tier 0 a round trip costs 0.015% + 0.015% = 0.03%, on spot 0.040% + 0.040% = 0.08%, so a 1% step keeps fees small.
  • Spot or perps. A long grid on perps holds a long position that pays or receives funding every hour. On spot there is no funding, but maker fees are higher and only some assets have spot markets. Our spot vs perps guide covers the trade-off.
  • Leverage. Leverage multiplies both grid profit and inventory loss, and a grid that buys all the way down a range can reach liquidation. The backtest below uses 1x.

30-day backtest on BTC, ETH, SOL and HYPE

Setup: $10,000 per coin, 20 arithmetic levels, range ±10% around the price 30 days ago, $500 per level. Levels above the start price were bought at the start (so the grid starts roughly half in coin, half in USDC). Each 15-minute candle was walked open → low → high → close on green candles and open → high → low → close on red ones. Fees are Hyperliquid's tier-0 maker rates; funding is the real hourly history applied to the coin the grid held.

Coin30-day moveFills / round tripsRealized grid profitGrid PnL before costsBuy & hold50/50 holdGrid on perps, net
BTC−25.3%58 / 23$124.93−$2,184.74−$2,530.69−$1,265.35−$2,239.78
ETH−27.8%100 / 41$262.73−$2,327.04−$2,782.18−$1,391.09−$2,356.61
SOL−29.7%90 / 38$215.41−$2,547.60−$2,967.61−$1,483.81−$2,573.58
HYPE−15.9%230 / 100$787.62−$735.97−$1,594.38−$797.19−$787.79

The 50/50 column is half of the buy & hold result, which is what you would get by holding the same starting mix as the grid and doing nothing.

What the numbers say

  • Grid profit is not PnL. HYPE's grid realized $787.62 from 100 round trips, the kind of number a bot dashboard highlights, yet the account was down $735.97 before costs because the coin it held lost value.
  • Trending markets break grids. BTC, ETH and SOL fell through the bottom of their ranges and spent 39%, 47% and 63% of the 15-minute bars below them. From that point the grid is just a long position, slightly larger than buy & hold (103% of the coin at the end) because it averaged down.
  • Choppy markets are where grids work. HYPE swung between 55.74 and 97.11, spending 20% of bars above the range and 27% below, and its grid did twice as many fills as any other. It roughly matched a 50/50 hold after costs (−$787.79 vs −$797.19), which is the best case in this sample.
  • Funding mattered more than fees on perps. Maker fees on $34k to $121k of grid volume were $5.12 to $18.12, while funding paid on the long inventory was $18.45 to $49.92. On spot, maker fees were $13.65 to $48.32 and funding was zero, so spot came out slightly ahead on every coin.

Caveats: this is one 30-day window in a falling market, a candle-based simulation (real fills depend on queue position and the intrabar path), and spot prices were approximated with perp prices. Treat it as an illustration of how grids behave, not a forecast.

When a grid makes sense, and when it does not

  • Good fit: a market moving sideways inside a range you can define, with frequent swings larger than your step, and low or negative funding if you use perps.
  • Bad fit: a strong trend in either direction. In a downtrend a long grid becomes a leveraged average-down; in an uptrend it sells too early. A neutral grid on perps (that can also go short) changes which side hurts, not the basic problem.
  • Exit plan: decide in advance what you do when price leaves the range: stop the grid and cut the inventory, move the range, or hold. Without a rule, a grid quietly turns into an unplanned position. Our TP/SL guide explains how to protect it.
  • If you want to accumulate rather than trade a range, a schedule usually fits better: see our DCA strategy guide.

The backtest script

Everything above comes from Hyperliquid's public info endpoint (candleSnapshot and fundingHistory), with no API key. Run it yourself to refresh the numbers or try other ranges and level counts:

#!/usr/bin/env python3
"""Long grid backtest on Hyperliquid: 20 arithmetic levels, range +/-10% around the start price,
$10,000 capital, 30 days of 15-minute candles and hourly funding from the public info endpoint."""
import time, requests
from datetime import datetime, timezone

HL = "https://api.hyperliquid.xyz/info"
def info(body):
    for _ in range(8):  # the info endpoint occasionally returns null; retry
        r = requests.post(HL, json=body, timeout=20).json()
        if r: return r
        time.sleep(6)
    return []

CAPITAL, LEVELS, WIDTH, DAYS = 10_000.0, 20, 0.10, 30
PERP_MAKER, SPOT_MAKER = 0.00015, 0.00040            # tier-0 maker fees (docs)
now = datetime.now(timezone.utc)
end_ms = int(now.timestamp() * 1000); start_ms = end_ms - DAYS * 86_400_000
fmt = lambda x: f"{x:,.2f}" if x >= 100 else f"{x:,.4f}"
print("snapshot", now.strftime("%Y-%m-%d %H:%M UTC"), f"| ${CAPITAL:,.0f}, {LEVELS} levels, range +/-{WIDTH*100:.0f}%, {DAYS} days of 15m candles")

def funding(coin):
    out, t = [], start_ms
    while t < end_ms:
        page = info({"type": "fundingHistory", "coin": coin, "startTime": t})
        if not page: break
        out += [(int(p["time"]), float(p["fundingRate"])) for p in page]
        nt = int(page[-1]["time"]) + 1
        if nt <= t or len(page) < 2: break
        t = nt
    return out

for coin in ["BTC", "ETH", "SOL", "HYPE"]:
    bars = info({"type": "candleSnapshot", "req": {"coin": coin, "interval": "15m", "startTime": start_ms}})
    bars = [(int(b["t"]), float(b["o"]), float(b["h"]), float(b["l"]), float(b["c"])) for b in bars]
    p0 = bars[0][1]; lo, hi = p0 * (1 - WIDTH), p0 * (1 + WIDTH)
    lv = [lo + (hi - lo) * i / LEVELS for i in range(LEVELS + 1)]
    per = CAPITAL / LEVELS                      # USDC allocated to each grid step
    # step i (lv[i] -> lv[i+1]) holds coin waiting to sell at lv[i+1], or USDC waiting to buy at lv[i]
    hold = [lv[i + 1] > p0 for i in range(LEVELS)]   # steps above the start price are bought at p0
    qty = [per / p0 if hold[i] else 0.0 for i in range(LEVELS)]
    init = list(hold)                           # True while a step still holds the initial inventory
    usdc = CAPITAL - per * sum(hold)
    fills, trips, grid_profit, vol = 0, 0, 0.0, per * sum(hold)
    inv = []                                    # (bar time, coin units, close) for funding
    last = p0
    for t, o, h, l, c in bars:
        path = [o, l, h, c] if c >= o else [o, h, l, c]   # assumed intrabar path
        for nxt in path[1:]:
            for i in range(LEVELS):
                if hold[i] and last < lv[i + 1] <= nxt:          # price rises through the sell level
                    usdc += qty[i] * lv[i + 1]; vol += qty[i] * lv[i + 1]
                    if not init[i]: grid_profit += qty[i] * (lv[i + 1] - lv[i]); trips += 1
                    else: grid_profit += qty[i] * lv[i + 1] - per   # initial inventory bought at p0
                    hold[i] = False; init[i] = False; qty[i] = 0.0; fills += 1
                elif not hold[i] and nxt <= lv[i] < last:        # price falls through the buy level
                    qty[i] = per / lv[i]; usdc -= per; vol += per; hold[i] = True; fills += 1
            last = nxt
        inv.append((t, sum(qty), c))
    end = bars[-1][4]
    value = usdc + sum(qty) * end
    hodl = CAPITAL / p0 * end
    f = funding(coin); k = 0; fund = 0.0
    for t, rate in f:
        while k + 1 < len(inv) and inv[k + 1][0] <= t: k += 1
        fund += inv[k][1] * inv[k][2] * rate
    above = sum(1 for b in bars if b[4] > hi); below = sum(1 for b in bars if b[4] < lo)
    print(f"\n{coin}: start {fmt(p0)} end {fmt(end)} ({(end/p0-1)*100:+.1f}%)  grid {fmt(lo)}-{fmt(hi)} step {fmt(lv[1]-lv[0])}  30d low/high {fmt(min(b[3] for b in bars))}/{fmt(max(b[2] for b in bars))}")
    print(f"  fills {fills}  completed buy->sell round trips {trips}  bars closing above range {above/len(bars)*100:.0f}% / below {below/len(bars)*100:.0f}%")
    print(f"  realized grid profit ${grid_profit:,.2f}  end value ${value:,.2f}  PnL before fees/funding ${value-CAPITAL:+,.2f}  coin held at end {sum(qty)/(CAPITAL/p0)*100:.0f}% of a full buy & hold")
    print(f"  fees on ${vol:,.0f} traded: perp maker ${vol*PERP_MAKER:.2f} | spot maker ${vol*SPOT_MAKER:.2f}  | perp funding on inventory ${-fund:+,.2f} (negative = paid by the long)")
    print(f"  buy & hold PnL ${hodl-CAPITAL:+,.2f}  |  grid on perps net ${value-CAPITAL-vol*PERP_MAKER-fund:+,.2f}  |  grid on spot net ${value-CAPITAL-vol*SPOT_MAKER:+,.2f}")

Output from the 24 November 2026 run:

snapshot 2026-11-24 08:14 UTC | $10,000, 20 levels, range +/-10%, 30 days of 15m candles

BTC: start 80,650.00 end 60,240.00 (-25.3%)  grid 72,585.00-88,715.00 step 806.50  30d low/high 55,170.00/81,955.00
  fills 58  completed buy->sell round trips 23  bars closing above range 0% / below 39%
  realized grid profit $124.93  end value $7,815.26  PnL before fees/funding $-2,184.74  coin held at end 103% of a full buy & hold
  fees on $34,125 traded: perp maker $5.12 | spot maker $13.65  | perp funding on inventory $-49.92 (negative = paid by the long)
  buy & hold PnL $-2,530.69  |  grid on perps net $-2,239.78  |  grid on spot net $-2,198.39

ETH: start 2,347.80 end 1,694.60 (-27.8%)  grid 2,113.02-2,582.58 step 23.4780  30d low/high 1,536.70/2,450.00
  fills 100  completed buy->sell round trips 41  bars closing above range 0% / below 47%
  realized grid profit $262.73  end value $7,672.96  PnL before fees/funding $-2,327.04  coin held at end 103% of a full buy & hold
  fees on $55,263 traded: perp maker $8.29 | spot maker $22.11  | perp funding on inventory $-21.28 (negative = paid by the long)
  buy & hold PnL $-2,782.18  |  grid on perps net $-2,356.61  |  grid on spot net $-2,349.14

SOL: start 101.59 end 71.4420 (-29.7%)  grid 91.4310-111.75 step 1.0159  30d low/high 64.8750/103.85
  fills 90  completed buy->sell round trips 38  bars closing above range 0% / below 63%
  realized grid profit $215.41  end value $7,452.40  PnL before fees/funding $-2,547.60  coin held at end 103% of a full buy & hold
  fees on $50,215 traded: perp maker $7.53 | spot maker $20.09  | perp funding on inventory $-18.45 (negative = paid by the long)
  buy & hold PnL $-2,967.61  |  grid on perps net $-2,573.58  |  grid on spot net $-2,567.69

HYPE: start 76.0420 end 63.9180 (-15.9%)  grid 68.4378-83.6462 step 0.7604  30d low/high 55.7370/97.1100
  fills 230  completed buy->sell round trips 100  bars closing above range 20% / below 27%
  realized grid profit $787.62  end value $9,264.03  PnL before fees/funding $-735.97  coin held at end 101% of a full buy & hold
  fees on $120,788 traded: perp maker $18.12 | spot maker $48.32  | perp funding on inventory $-33.70 (negative = paid by the long)
  buy & hold PnL $-1,594.38  |  grid on perps net $-787.79  |  grid on spot net $-784.29

Track your grid's real PnL with Hyperfolio

The number that matters for a grid is total PnL after fees and funding, not the grid profit counter. Hyperfolio is a free, read-only PWA for Hyperliquid wallets: paste the address your grid trades from and see positions, realized and unrealized PnL, fees and funding, with no wallet connection and no API keys. Our real PnL guide explains how those pieces add up. If you do not have a Hyperliquid account yet, the referral code HYPERFOLIO gives you 4% off trading fees, which helps a strategy that trades this often (details in our referral code guide).

FAQ

Does Hyperliquid have a grid bot?

Not built into the interface. You can approximate a grid with Scale orders, write your own bot with the API, or use a third-party bot platform that supports Hyperliquid.

Is grid trading profitable on Hyperliquid?

Only in sideways markets. In our 30-day test all four grids realized grid profit but lost money overall, because prices fell 16% to 30% and the grids held more and more coin on the way down.

Should I run a grid on spot or perps?

Perps have lower maker fees (0.015% vs 0.040% at tier 0) but the long inventory pays funding when the rate is positive. In our test funding outweighed the fee difference, so spot was slightly cheaper on every coin.

How many grid levels should I use?

Enough that the step is well above two maker fees and small enough that price crosses it often. With 20 levels over ±10%, each step was 1%, and round-trip maker fees were 0.03% on perps.

What happens when the price leaves the grid range?

Below the range you are fully in the coin and carry its loss; above it you are fully in USDC and miss further gains. Set a rule in advance to stop, move or close the grid.

Can I use leverage on a grid?

Yes on perps, but leverage scales the inventory loss as well as the grid profit. A long grid that buys through its whole range at high leverage can be liquidated.

Try Hyperfolio for free

Track your Hyperliquid portfolio in real time with PnL, Smart Money, Markets, Perp Calculator, multi-venue portfolio and push alerts.

HYPERLIQUID

-4% fees

Trade on Hyperliquid · 4% off fees

Hyperfolio is an independent app, free to use with no subscription. We're funded by Hyperliquid referrals, ad space and donations; we truly appreciate you trading through our link.

Use referral

Free for you · keeps Hyperfolio running

Related articles

Guide

Hyperliquid DCA Strategy: Spot vs Perps, 26-Week Backtest (2026)

How to dollar-cost average on Hyperliquid: spot vs 1x perp long, real fees and funding, how the DCA average entry price works, and a 26-week BTC/ETH/SOL/HYPE backtest of DCA vs lump sum from 2026-11-23.

Guide

Hyperliquid Risk-Reward Ratio: 1:2 and 1:3 After Fees (2026)

How to use the risk-reward ratio on Hyperliquid perps: how taker/maker fees shrink R, the break-even win rate for 1:1, 1:2 and 1:3, position sizing from the stop and a 30-day BTC/ETH/SOL/HYPE backtest from 2026-11-22.

Guide

Hyperliquid Break-Even Price: Fees + Funding Formula (2026)

How to calculate your break-even price on Hyperliquid perps: the exact formula with taker/maker fees and hourly funding, a live BTC/ETH/SOL/HYPE table from 2026-11-21 08:09 UTC and a Python script.

Guide

How to Short on Hyperliquid (2026): Step-by-Step Guide

How to short on Hyperliquid with perps: step-by-step setup, a $10k ETH example, short-side funding, liquidation prices at 1x-5x and hedging, with live data from 2026-11-20 08:08 UTC.

Guide

Hyperliquid Liquidation Map: Real Liquidation Levels (2026)

Build a Hyperliquid liquidation map from real on-chain positions instead of estimated heatmaps. Dated example from the 300 largest accounts on 2 Nov 2026, how to read clusters and concentration, and a Python script.

Guide

Best Time to Trade on Hyperliquid: Hours & Days (2026)

When Hyperliquid volume and volatility peak, by UTC hour and weekday, measured from 672 hourly candles (4 Oct to 1 Nov 2026) for BTC, ETH, HYPE and SOL, with what it means for slippage, stops and funding, plus a Python script.