Blog · Hyperliquid · Article · updated 2026-09-25
What is a Hyperliquid API (agent) wallet, and is it safe?
A Hyperliquid API wallet is a separate key your main wallet authorizes to trade but never withdraw. Here is how it works, what it can and cannot do, and how TensorTrader creates one without ever seeing your seed phrase.
The short answer
A Hyperliquid API wallet, also called an agent wallet, is a second private key that your main wallet signs a one-time approval for. Once approved, Hyperliquid accepts orders signed by that agent key as if they came from your account, but it refuses any withdrawal or transfer signed by it. Your funds stay in your main address, and the only thing the agent can do is trade them.
That split is why agent wallets are the safe way to automate Hyperliquid. A bot needs a key that can sign orders around the clock. Handing it your seed phrase would give it everything; handing it an agent key gives it exactly one power, and you can revoke that power by approving a different agent or disconnecting.
Why Hyperliquid needs a key instead of an API secret
Centralized exchanges authenticate bots with an API key and secret that the exchange issues and stores. Hyperliquid is a decentralized exchange: there is no account database holding a secret for you. Every action is a message signed by a wallet, and the exchange checks the signature against the address that owns the funds.
So automation on Hyperliquid always comes down to one question: which key signs the orders? The answer should never be your main wallet, because the main wallet can also move money out. Hyperliquid solved this with the ApproveAgent action: your main wallet signs a typed message (EIP-712) naming an agent address, and from then on the exchange lets that agent trade for you.
What an agent wallet can and cannot do
The worst case with a leaked agent key is bad trading, not stolen funds. That is still a real risk with leverage, which is why TensorTrader clamps leverage to the lower of your policy and the venue maximum and runs protective orders, but it is a very different risk from losing custody.
- can
- Place, amend and cancel orders on your perpetual and spot account
- can
- Close positions, including stop-loss and take-profit orders
- cannot
- Withdraw USDC or any asset to another address
- cannot
- Transfer funds to a different Hyperliquid account
- cannot
- Approve further agents or change your wallet settings
How TensorTrader creates your agent wallet
What gets stored: your public wallet address and the agent private key, both encrypted. What never gets stored or even requested: your seed phrase, your main private key, or any key that can withdraw. You do not create anything on app.hyperliquid.xyz and you never paste a key.
- 1In Settings, Exchange Auth, pick Hyperliquid and press Connect Wallet. MetaMask or a compatible browser wallet is required.
- 2TensorTrader generates a fresh agent key inside your browser. It is random and new; it is not derived from your seed.
- 3Pick the network: testnet for paper trading or mainnet for real funds. The cards show the balance found on each.
- 4Press Authorize Trading. MetaMask switches to Arbitrum Sepolia (testnet) or Arbitrum One (mainnet) and asks you to sign an ApproveAgent message for an agent named "TensorTrader".
- 5TensorTrader submits the signed approval to Hyperliquid and then asks Hyperliquid whether the agent is registered. The panel turns green only after that check passes.
Is it safe? The honest risk list
Agent wallets remove custody risk, but they do not remove every risk. Three remain. First, trading risk: an agent can open losing positions, and leverage magnifies losses. Second, operator risk: whoever holds the agent key can trade your account, so the service storing it must protect it. TensorTrader encrypts it at rest and never logs it. Third, approval risk: always read what MetaMask shows before signing. A legitimate agent approval names an agent address and a label; it never asks to transfer funds.
A good habit is to start on testnet, where the same flow runs against test funds, and only approve a mainnet agent once alerts, sizing and exits behave the way you expect. Choosing the mainnet card is itself the explicit live opt-in in TensorTrader.
How to revoke an agent
In TensorTrader, use Disconnect & Remove API Key under Exchange Auth. The engine stops trading that account immediately, and if an agent ever stops being approved on Hyperliquid's side, orders fail and the logs tell you to reconnect instead of guessing. You can also approve a new agent at any time, which replaces the old one for that name.
Agent wallets vs CEX API keys
- who issues it
- CEX: the exchange issues key + secret. Hyperliquid: you generate a key and your wallet approves it.
- where funds live
- CEX: in the exchange’s custody. Hyperliquid: in your own address.
- withdrawal risk
- CEX: depends on the permission box you tick. Hyperliquid agent: impossible by design.
- revocation
- CEX: delete the key on the exchange. Hyperliquid: approve a new agent or disconnect.
Frequently asked questions
- Can a Hyperliquid agent wallet withdraw my funds?
- No. Hyperliquid refuses withdrawals and transfers signed by an agent key. Only your main wallet can move funds.
- Do I need to create the API wallet on the Hyperliquid website?
- Not with TensorTrader. The agent key is generated in your browser and approved with one MetaMask signature from the Exchange Auth panel.
- What network does the approval use?
- MetaMask signs on Arbitrum Sepolia for testnet and Arbitrum One for mainnet; the approval itself is sent to Hyperliquid.
- Does TensorTrader ever see my seed phrase?
- No. It stores only your public address and the restricted agent key, encrypted.
Keep reading
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.
Connect Hyperliquid to TensorTrader with a MetaMask agent wallet
No API key to copy: approve a TensorTrader agent wallet from MetaMask, start on Hyperliquid testnet, and trade perps from TradingView alerts without ever sharing your seed phrase.
Is a Hyperliquid trading bot safe? 10 questions answered
Custody, keys, leverage, liquidation, outages and the operator: the real risks of automating Hyperliquid and how to reduce each one.
Trade-only API keys: which permissions to enable, and which never to enable
A plain guide to exchange API key permissions for trading bots: what trade, read, transfer and withdraw mean, the passphrase exchanges, IP allow-lists and DEX agent keys.
Not financial advice. Performance figures are TensorTrader testnet or backtest results with the method stated; past results do not predict future returns.