Skip to content

Blog · Hyperliquid · Guide · updated 2026-09-25

Hyperliquid trading bot: how to automate Hyperliquid perps safely

The complete guide to automating Hyperliquid: agent wallets, testnet, TradingView and GoCharting alerts, leverage and margin, fees and funding, portfolio mode, and the real results of our own testnet books.

Key takeaways

  1. 1Automate Hyperliquid with an agent wallet that can trade but never withdraw; never use your seed phrase.
  2. 2Start on the Hyperliquid testnet and prove alerts, sizing, exits and accounting before mainnet.
  3. 3TradingView, GoCharting and TrendSpider alerts reach Hyperliquid through a webhook bridge that clamps leverage to the market maximum.
  4. 4Fees and funding decide most automated outcomes; our own testnet book lost 11.9% over 105 trades.

Why automate Hyperliquid

Hyperliquid is the largest decentralized perpetual futures exchange: an on-chain order book on its own layer-1, USDC-margined perps on well over a hundred tokens, and liquidity on the major markets that rivals centralized exchanges. For automated traders it has one property no centralized exchange can match: you never hand your funds to anyone. They stay in your own address, and a bot trades them with a restricted key that cannot withdraw.

That combination, deep liquidity without custody risk, is why Hyperliquid has become a favorite venue for TradingView automation. This guide covers everything you need to automate it well: how the keys work, how to test on testnet, how alerts turn into orders, how leverage, margin, fees and funding behave, how TensorTrader's portfolio mode manages many signals, and what our own testnet books actually earned. It is honest about the last part, because the most useful thing a guide can do is stop you losing money to avoidable mistakes.

Chapter 1: agent wallets, the safe way to give a bot access

On a centralized exchange, a bot authenticates with an API key and secret the exchange issues. Hyperliquid has no such database: every action is a message signed by a wallet. The safe way to automate it is an agent wallet, also called an API wallet. Your main wallet signs one approval naming a second key, and from then on Hyperliquid accepts orders signed by that agent but refuses any withdrawal or transfer it signs.

TensorTrader creates the agent in your browser and asks MetaMask for one EIP-712 signature, on Arbitrum Sepolia for testnet or Arbitrum One for mainnet. It stores your public address and the restricted agent key, encrypted. It never sees your seed phrase and you never paste a key. If the agent key ever leaked, the worst outcome is bad trading on your account, not theft. You revoke it by disconnecting in Exchange Auth or approving a new agent.

Chapter 2: start on testnet

Hyperliquid runs a complete testnet with its own API, order books and valueless test USDC. Everything that matters for automation works the same: agent approvals, order types, margin, leverage and funding. TensorTrader defaults every new Hyperliquid connection to the testnet card, never silently switches environments, and reads testnet equity from the public clearinghouse state.

Use testnet to prove mechanics: that alerts arrive, map to the right perp and direction, size correctly after the leverage clamp, get protective orders right after the fill, and book profit and fees from Hyperliquid's own fills. Do not use it to estimate profitability; testnet liquidity is thinner and prices can drift from mainnet. A two-week plan works well: one manual alert, then a small batch on one timeframe, then a second timeframe as a DCA leg, then a decision based on net results after fees.

Chapter 3: from TradingView alert to Hyperliquid order

TradingView cannot trade Hyperliquid directly. It sends webhooks: HTTP requests with a message you define, fired when an alert triggers. TensorTrader receives the webhook, checks the secret, validates every field against an allow-list, normalizes the symbol to a Hyperliquid perp, sizes the position from your policy, clamps leverage to the lower of your policy and the market's maximum, and signs the order with your agent key. After the fill it places reduce-only stop-loss and take-profit orders and keeps reconciling the position with the exchange.

You rarely write webhook JSON yourself. The TensorTrader Chrome extension's Batch Create tab builds the alerts: pick your Hyperliquid key, type tokens, choose an indicator or strategy from your TradingView favorites, set timeframes, leverage and risk handling, review the plan and create. It checks existing alerts first, creates each new one exactly once, and reconciles at the end so duplicates cannot slip in. Strategies are usually the cleanest to automate, because entries and exits live in one script and {{strategy.order.action}} tells TensorTrader the direction of each fill.

Chapter 4: GoCharting and other signal sources

TradingView is not the only source. GoCharting alerts, including footprint and order-flow conditions and Lipi scripts, can call the same TensorTrader bridge with a JSON body and execute on Hyperliquid. The setup adds a canary step: an entry, an exit, a fresh Lipi event and a static paper body must all execute on testnet before the flow is allowed to run. GoCharting alerts expire and cannot be renewed from TensorTrader, so plan to rebuild the set before expiry. TrendSpider alerts work through the same bridge too.

Chapter 5: leverage, margin and Unified Account

Hyperliquid publishes a maximum leverage per market, up to 50x on the largest ones. Leverage multiplies gains and losses on your margin, and liquidation comes quickly at high multiples: at 50x, a move of under 2% against you can wipe out the margin. Most automated strategies should run far lower, 2-3x while learning.

Hyperliquid's Unified Account mode, the default for new accounts, lets spot USDC count as perp margin without a manual transfer. TensorTrader reads equity as perp account value plus spot USDC and only moves spot USDC into perps when an account is not unified. Leverage in Batch Create can be static, scaled with signal confidence, or scaled with market breadth: each trade starts at a base multiplier and ramps toward a cap only as the broader market leans with it. Whatever the mode, the final number is clamped to the venue maximum.

Chapter 6: fees, funding and slippage

Every automated round trip pays twice, usually at the taker rate, plus slippage both ways, plus funding if you hold positions. Hyperliquid's fees are tiered by volume; check its documentation for current rates. Funding is exchanged between longs and shorts on a frequent schedule and applies to your full notional, so it matters more for multi-day holds and higher leverage.

Costs decide most automated outcomes. Our own Hyperliquid testnet book closed 105 TT-Autotune trades between 6 and 19 August 2026: gross minus 25.42 USDC, fees 5.73 USDC, net minus 31.15 USDC on 262.41 USDC of starting equity, a net ROI of minus 11.9%. The strategy lost before fees, and fees added about a quarter again. TensorTrader books every closed trade from Hyperliquid's own fills with the venue-reported fee, so the dashboard shows the same number the exchange does.

TT-Autotune · testnet ROI · demo accounttestnet keys only · refresh 60s
Loading testnet ROI…

Net ROI % = (gross PnL − fees) / starting testnet equity = — − — / — = —

trades
—
win_rate
—
profit_factor
—
max_drawdown
—
venue_verified
—
legend
gross · fees · drawdown · SMA24 · W/L marks

Chapter 7: which timeframes and which strategies

TensorTrader's TT-Autotune tunes the Lorentzian Classification strategy for 63 tokens across six timeframes and six market regimes. In its catalog, the tuned daily cell had the highest ROI for 35 tokens, the 4-hour cell for 25, and the 1-hour cell for 3. Two effects explain it: lower timeframes carry more noise relative to the move, and they trade far more often, paying more in fees. The comparison has caveats (daily cells span longer histories), but it points the same way as our fee analysis: fewer, larger moves are easier to profit from after costs.

Regime matters as much as timeframe. A trend setting that works in Bull+ can bleed in Chop. TT-Autotune keeps a separate champion per regime and switches live as its classifier changes label; TensorTrader's script tournament ranks published TradingView strategies within each regime and timeframe so you can shortlist candidates for your conditions.

Chapter 8: portfolio mode for many signals

Run many alerts across timeframes and they will disagree. Portfolio mode, built for Hyperliquid, treats them as a sensor net and keeps one net position per token: the 4-hour sets direction, the 1-hour the core, the 15-minute adds or trims, and the 5-minute fine-tunes. Reversals need the 4-hour and 1-hour to agree. Risk brakes are fixed: an 85% margin ceiling, no new adds at 4% drawdown, back to core at 6%, and a flatten-and-latch at 10% that needs you to resume. It holds at most four uncorrelated tokens. Portfolio mode fails closed and has not placed live orders yet; it runs in shadow and on testnet while it earns its acceptance record.

Chapter 9: Hyperliquid compared with dYdX and Lighter

TensorTrader is live-ready on three decentralized perps venues. Hyperliquid leads on liquidity and market count and has the simplest key setup. dYdX v4 runs its own Cosmos-based chain with an off-chain order book and a 20x cap; its connect flow derives a restricted trading key from your wallet. Lighter is a zk-rollup with verifiable matching, a 20x cap and headless order signing. All three settle in USDC, all three have confirmed testnets, and all three execute TradingView alerts paper first. The simplest way to choose is to run the same small alert set on all three testnets and compare fills and fees.

Chapter 10: is it safe?

With an agent wallet, a Hyperliquid bot cannot withdraw your funds, which removes the largest risk in automated trading. The remaining risks are trading risk (automation executes bad trades as faithfully as good ones), leverage and liquidation, operational risk (alerts, webhooks, the executor and the exchange all have to work) and operator risk (the service holding the agent key must protect it). TensorTrader's answers are low default leverage, the venue clamp, real reduce-only protective orders on the exchange, fail-closed handling of ambiguous states, encrypted keys that are never logged, and paper-first defaults with an explicit live opt-in.

A step-by-step path from zero to live

  1. 1Read the agent-wallet explainer and install MetaMask.
  2. 2Create a TensorTrader account and connect Hyperliquid on the testnet card.
  3. 3Install the Chrome extension and build a small batch: three liquid tokens, one timeframe, low leverage.
  4. 4Watch fills, protective orders and closed-trade accounting for a week.
  5. 5Add a second timeframe as a DCA leg and compare net results after fees per timeframe.
  6. 6Cut what does not pay for its fees. Keep leverage at or below 3x.
  7. 7Only then approve a mainnet agent, which is the explicit live opt-in, with a small allocation.
  8. 8Review weekly with the Intelligence tab and retire alerts that stop earning.

Common mistakes on Hyperliquid

pasting a private key
Never needed; the agent is generated in your browser and approved by signature.
testnet agent on mainnet
Each network needs its own approval; choosing mainnet is the live opt-in.
leverage from a backtest
Size leverage from your account’s risk budget, not from what looked best historically.
too many small alerts
Every round trip pays taker fees twice; fewer, better signals win after costs.
ignoring funding
Multi-day holds on the crowded side can pay meaningful funding on full notional.
manual trades on the bot’s account
Mixing hand trades with automated positions confuses both; use a separate account or subaccount.

Key terms

agent wallet
A key approved by your wallet that can trade but not withdraw
ApproveAgent
The Hyperliquid action your wallet signs to authorize an agent
Unified Account
Spot USDC counts as perp margin without transfers
reduce-only
An order that can only shrink a position, used for stops and targets
funding
Periodic payment between longs and shorts that anchors the perp to spot

Frequently asked questions

What is the best Hyperliquid trading bot?
The one that trades your own tested strategy, with an agent wallet, low leverage and exchange-side protective orders. Be wary of any bot that asks for your seed phrase or promises returns.
Can I automate Hyperliquid with TradingView?
Yes. TradingView webhooks go to a bridge like TensorTrader, which signs orders with your Hyperliquid agent key.
Is there a free Hyperliquid bot?
TensorTrader has a Free plan (one token, one timeframe, one exchange) and 30- or 90-day beta trials; the Hyperliquid testnet costs nothing.
Do I need to keep my computer on?
No. TradingView alerts run on TradingView’s servers and TensorTrader executes on its own.
Which timeframe should a Hyperliquid bot use?
Higher timeframes trade less and pay less in fees; in our optimizer catalog the 1d and 4h cells won most often. Test on paper before deciding.

Every Hyperliquid guide

Keep reading

Not financial advice. Performance figures are TensorTrader testnet or backtest results with the method stated; past results do not predict future returns.

All guides · Start on paper · Pricing