Hyperliquid API Wallets (Agent Wallets) Explained
A Hyperliquid API wallet, or agent wallet, is a key that can trade for your account but cannot withdraw. How to create, name, expire and revoke one safely.
Key facts
- A Hyperliquid API wallet, also called an agent wallet, is a separate key that a master account approves to sign trading actions on its behalf.
- A Hyperliquid API wallet can place and cancel orders but cannot withdraw or transfer funds out of the account.
- Approving a new unnamed API wallet on Hyperliquid deregisters the previous unnamed one, and approving a named wallet replaces any existing wallet with the same name.
- To read positions or balances on Hyperliquid you must query the master or sub-account address, not the API wallet's address, which returns an empty result.
- Hyperliquid's docs strongly advise never reusing an API wallet address after it has been deregistered or has expired, because its nonce history may be pruned.
- Hyperliquid tracks nonces per signer, so its docs recommend a separate API wallet for each trading process and each sub-account.
A Hyperliquid API wallet is a key that can trade for your account without being able to take money out of it. Hyperliquid's docs also call it an agent wallet; the two names mean the same thing. It is what lets a bot, a trading terminal or an AI agent place orders for you while your main wallet stays offline.
This guide covers what an API wallet can and cannot do, how approval, naming and expiry work, the mistakes that most often break a bot, and how to revoke one. Published December 5, 2026.
| Main wallet | API wallet | |
|---|---|---|
| Place and cancel orders | Yes | Yes |
| Withdraw or transfer funds | Yes | No |
| Approve another API wallet | Yes | No |
| Approve a builder fee | Yes | No |
| Holds the account's funds | Yes | No, it only signs |
| Address to query for balances and positions | This address | Not this address; use the main or sub-account address |
What an API wallet is
An API wallet is an ordinary keypair with one special property: your master account has told Hyperliquid, on-chain, that this key may sign trading actions for it. The approval is an ApproveAgent action signed by the main wallet.
The key is used only to sign. It has no balance and no positions of its own. When it signs an order, the order is placed on the master account, or on a sub-account if one is specified, and margin comes from there.
The safety value is in what the key cannot do. Withdrawals, transfers and approvals of other keys or of builder fees must be signed by the main wallet. If an API wallet key leaks, the worst an attacker can do is trade the account badly. That is a real risk, since bad trades can lose money, but the attacker cannot move the funds to themselves.
Named, unnamed and expiring wallets
An approval can carry a name or not. The difference matters because of how replacement works. Sending ApproveAgent for a new unnamed wallet deregisters the existing unnamed wallet. Sending it with a name deregisters whichever wallet currently holds that name. So one unnamed wallet is the default slot that each new app overwrites, and names let several keys coexist.
This is the most common reason a working bot suddenly stops. You connect your wallet to a second app or a fresh browser, it approves a new unnamed agent, and the key your bot was using is no longer valid. Orders then fail with an error saying the user or API wallet does not exist. The fix is to approve a new key for the bot, ideally under its own name.
An approval can also be given an expiry time, after which the key stops working without any further action. Short-lived keys are a sensible default for anything you are testing.
How many API wallets an account can hold, and how that grows with sub-accounts, is covered in Hyperliquid Sub-Accounts: Limits, Fees, Margin & API.
Mistakes that break bots
Querying the wrong address. Info requests for balances, positions and fills take the address of the account that holds them. Passing the API wallet's address returns an empty result, which looks like an empty account. Hyperliquid's docs call this out as a common pitfall.
Reusing an old key. Once an API wallet is deregistered or expires, Hyperliquid may prune its nonce history. The docs strongly advise generating a fresh wallet each time, because actions signed earlier with a reused key could be replayed after pruning.
Sharing one key across processes. Nonces are tracked per signer, and Hyperliquid keeps the 100 highest per address. Two processes signing with the same key can collide. The docs recommend one API wallet per trading process and separate wallets for separate sub-accounts.
Stale timestamps. A nonce must fall within two days before and one day after the block's timestamp, so a machine with a badly wrong clock will have its orders rejected.
How to revoke an API wallet
There are three ways a key stops working. It expires, if you set an expiry. It is replaced, when you approve a new wallet in the same slot (unnamed, or the same name). Or you remove it from the API section of the Hyperliquid app, which lists the wallets your account has authorised.
Revoking a key stops new orders from it. It does not close positions the key opened or cancel the stop and target orders already resting on the book. After revoking, check open positions and open orders yourself.
API wallets and trading agents
Any service that trades Hyperliquid for you without taking custody is using this mechanism. That includes Signalview: when you start an agent, your wallet approves an API wallet for it, and the agent can then place and cancel perp orders on your account and nothing else. The design and its limits are covered in Non-Custodial AI Trading Agents.
Two questions are worth asking of any such service. Does it ask you to approve an agent key, or to paste your main private key? Only the first is safe. And is the builder fee, if any, approved separately by your main wallet with a visible maximum? Hyperliquid Builder Codes Explained shows how to check and revoke that approval.
Sources
Risk warning: perpetual futures are leveraged and you can lose your entire margin. Backtested and paper results do not predict future results. Nothing on this page is financial advice. Signalview is non-custodial software; you trade on your own Hyperliquid account. See how it has performed on Paper Trading.
Frequently asked questions
- What is a Hyperliquid API wallet?
- It is a separate key that your main account approves to sign trading actions for it. Hyperliquid's docs also call it an agent wallet.
- Can a Hyperliquid API wallet withdraw my funds?
- No. An API wallet can place and cancel orders, but withdrawals and transfers must be signed by the main wallet.
- Is an agent wallet the same as an API wallet on Hyperliquid?
- Yes. Hyperliquid's documentation uses both names for the same thing.
- Why did my Hyperliquid bot stop with an error that the API wallet does not exist?
- Most often because a new unnamed API wallet was approved from another app or browser, which deregistered the one the bot was using. Approve a new key for the bot, preferably with its own name.
- Why does my API wallet show an empty account?
- Because the API wallet holds nothing. Query the master account or sub-account address to see balances and positions.
- How do I revoke a Hyperliquid API wallet?
- Remove it in the API section of the Hyperliquid app, let it expire, or approve a new wallet in the same slot. Existing positions and resting orders are not closed by revoking.