How to Set Up a Trading Bot on Hyperliquid
To run a bot on Hyperliquid you create an API wallet (an "agent") in the Hyperliquid interface, authorise it against your main account, and give its private key to your trading software. The agent can sign orders but cannot withdraw funds. Budget 15 minutes, and start at the smallest size the venue accepts.
Hyperliquid is an on-chain perpetuals exchange with an order book, which makes it unusual: you get centralised-exchange execution semantics with self-custody. That combination changes how bot setup works compared with Binance or Bybit, and the differences are exactly where first-time setups go wrong.
- Hyperliquid authenticates with an EIP-712 signature from an agent wallet, not an API key and secret.
- The agent wallet can trade but can never withdraw — that is enforced by the protocol, not by a settings toggle.
- If you trade from a sub-account or vault, your software must be told the master address or every order fails.
- Reduce-only limit orders below roughly $10 notional are rejected, which silently breaks multi-leg exit ladders on small positions.
- There is no gas cost per order, so ladder strategies that would be uneconomic on other chains are viable here.
Why run a bot on Hyperliquid?
Three properties matter for automation specifically:
- A real order book. Not an AMM. Limit orders, post-only, reduce-only and stop triggers behave the way a bot expects, so strategies written for centralised venues port over.
- Self-custody. Your funds sit in a protocol account you control. There is no exchange withdrawal queue and no counterparty deciding when you can leave.
- No per-order gas. Orders are sequenced by the chain without a per-transaction fee to you, so a ten-leg entry ladder costs nothing extra to place. On a general-purpose L1 the same strategy would be dominated by gas.
The trade-off is a smaller pair universe than Binance and thinner books on the long tail. For majors it is competitive; for a low-liquidity altcoin, check the book before you automate anything against it.
Step 1 — Fund your Hyperliquid account
Deposit USDC via the bridge from Arbitrum, or use one of the supported deposit routes in the interface. Wait for the balance to appear in your perps account rather than spot — bots trade the perps account, and a balance sitting in spot will look like an empty account to your software.
Start with an amount you would be comfortable losing entirely while you verify the setup behaves as expected.
Step 2 — Create an API wallet (agent)
This is the step that differs most from other exchanges. Hyperliquid does not issue an API key and secret. Instead you authorise a separate wallet — an agent — to sign actions on behalf of your main account.
- Open the Hyperliquid interface and go to the API section of your account settings.
- Generate a new API wallet. You will be shown a private key.
- Authorise it. This is an on-chain action signed by your main wallet, and it is what links agent to account.
- Copy the private key somewhere safe. It is shown once.
The security property that matters: an agent wallet can place and cancel orders. It cannot initiate a withdrawal. That is a protocol-level constraint, not a permission checkbox that could be misconfigured. A leaked agent key lets an attacker trade your account badly — which is bad — but not drain it.
Step 3 — Connect the agent to your software
Paste the agent private key into your platform's credential form. In TradeFloor that is Settings → Credentials → Add credential → Hyperliquid; the key is encrypted at rest and order signing happens in an isolated component that never exposes it back to the application.
The sub-account and vault trap
If your agent was created under a sub-account, or you trade through a vault, orders must be submitted with the master account address attached. Omit it and every order is rejected with an authorisation error that reads as if the key itself is wrong — which sends people back to regenerate a key that was fine all along.
Good platforms detect this automatically by querying the wallet's role and pinning the master address for you. If yours doesn't, find the field called vault address, master address or account address and fill it in. This is the single most common first-time setup failure on Hyperliquid.
Step 4 — Configure your first strategy
Resist the urge to start with something clever. A first configuration should be boring enough that you can predict exactly what it will do.
| Setting | First-run value | Why |
|---|---|---|
| Pair | BTC or ETH | Deepest books, least slippage while you are validating plumbing |
| Leverage | 2–3× | Enough that a mistake is visible, low enough that it is survivable |
| Position size | Exchange minimum | You are testing wiring, not seeking return |
| Stop-loss | 1.5–2% | Wide enough to survive noise, tight enough to bound the loss |
| Take-profit | Single leg | Ladders introduce the notional-minimum problem below |
| Entry rule | One condition | Multi-condition rules are harder to debug when nothing fires |
The $10 notional floor
Hyperliquid rejects reduce-only limit orders below roughly $10 of notional value. This has a non-obvious consequence for exit ladders. Split a $40 position across five take-profit legs and each leg is $8 — under the floor. The first legs may place while the last ones fail, and unless your software validates the whole ladder up front, you get a position whose actual exit plan does not match its configuration.
Two rules follow: keep early positions to a single take-profit leg, and when you do ladder, check that position_notional / number_of_legs clears $10 with margin to spare.
Insurance and averaging orders
The same floor applies to averaging ladders, where it compounds — each rung is multiplied by your martingale factor, so the smallest rung is the one at risk. Before enabling averaging, read how insurance orders work and where martingale sizing breaks.
Step 5 — Verify the position is actually protected
After the first entry fills, do not assume the bracket exists. Check it, in this order:
- Open the Hyperliquid orders panel directly, not just your platform's view.
- Confirm a reduce-only stop order exists on the correct side, at the price you expect.
- Confirm the take-profit is there and that its size matches the position.
- Confirm the total reduce-only size does not exceed the position size.
A live position without a live stop is the most expensive state a bot can be in, and it is invisible unless you look. Any platform worth using also runs an automatic reconciliation pass that re-places missing protective orders continuously — but verify it manually the first few times so you know what correct looks like.
Step 6 — Monitor, then scale slowly
Watch the first ten to twenty trades before changing anything. What you are looking for is not profit; it is correctness:
- Did entries fire where your rule said they should, and not fire where it said they shouldn't?
- Did stops execute at roughly the configured distance, or was slippage materially worse?
- Did anything close for a reason you did not configure?
- Does the realised cost per round trip match what you assumed when you designed the strategy?
Only once all four are boring should size go up, and then in steps small enough that a bad step is recoverable.
Common Hyperliquid setup errors
| Symptom | Actual cause |
|---|---|
| Every order rejected as unauthorised | Agent belongs to a sub-account; master address not configured |
| Entry fills, no stop appears | Stop notional under the $10 reduce-only floor, or tick-size rounding rejected it |
| Bot reports no balance | Funds are in the spot account, not perps |
| Some take-profit legs missing | Ladder legs individually below the notional floor |
| Worked yesterday, fails today | Agent authorisation expired or was revoked; re-authorise |
How Hyperliquid compares for automation
Against Binance and Bybit, Hyperliquid trades pair breadth for custody and predictable order semantics. The authentication model is genuinely different — signature-based rather than key-and-secret — which matters if you are writing your own client. That comparison is broken down properly in the API comparison for algo traders, and the trader-level view is in Binance vs Bybit vs Hyperliquid.
Frequently asked questions
Can a Hyperliquid API wallet withdraw my funds?
No. An agent wallet is authorised to place and cancel orders on behalf of your account and cannot initiate withdrawals. That restriction is enforced by the protocol rather than by a permission setting, so it cannot be misconfigured. A leaked agent key still lets someone trade your account badly, so treat it as sensitive.
Why are my Hyperliquid orders rejected as unauthorised?
The usual cause is a sub-account or vault setup where the master account address was not supplied alongside the agent key. Hyperliquid needs to know which account the agent is acting for. Find the vault or master address field in your platform and fill it in — regenerating the key will not help, because the key was never the problem.
What is the minimum order size on Hyperliquid?
Reduce-only limit orders below roughly $10 of notional value are rejected. This matters most for multi-leg take-profit ladders: a $40 position split five ways gives $8 legs that will fail. Check that position notional divided by the number of legs clears $10 before enabling a ladder.
Do I pay gas for each order on Hyperliquid?
No. Order placement does not carry a per-transaction gas cost to the trader, which is why ladder strategies with many resting orders are practical there and uneconomic on a general-purpose L1. You still pay standard maker and taker trading fees, and funding on open perpetual positions.
Is Hyperliquid good for beginners running a bot?
The self-custody model and the absence of per-order gas are beginner-friendly, and order semantics match what most bot software already expects. The two things that catch beginners are the agent-wallet authorisation flow and the $10 reduce-only floor. Both are covered above and neither recurs once configured.
How long does it take to connect a bot to Hyperliquid?
Around 15 minutes for the mechanical steps: fund the perps account, create and authorise the agent wallet, paste the key into your platform, configure one conservative strategy. Budget considerably longer for watching the first ten to twenty trades before increasing size.
Binance vs Bybit vs Hyperliquid: Which Exchange for Bot Trading?
Fees, liquidity, custody and regulatory posture compared for automated trading.
// questions or corrections · [email protected] · more essays · /blog