Hannya

Hyperliquid API wallet: what it can and cannot do

For a bot or a service to trade on your Hyperliquid account, you do not hand over your wallet: you give it an API wallet, also called an agent. Here is what that access really allows, what it does not, and what it does not protect you from.

In short: an API wallet is a separate key, approved by your main wallet, that signs orders for your account. It can trade, change leverage and move funds between your own balances; it cannot withdraw, send funds to another address or approve a builder fee. It lives 180 days at most. It does not protect you from trading losses.

Facts checked on 2026-11-30 in Hyperliquid's documentation.

What it is

  • A separate private key that your main wallet approves to sign on its behalf, for your main account or its sub-accounts.
  • It holds no funds: it is only used to sign. Your funds stay on your main wallet's address.
  • The service you entrust it to receives its private key, never your main wallet's.

What it can do

  • Place, modify and cancel orders, and change leverage.
  • Move funds between your own balances: the destination must be your own address.
  • Deposit funds into staking for your account.

What it cannot do

  • Withdraw your funds out of Hyperliquid, or send USDC to another address: those actions are signed with your main wallet.
  • Approve a builder fee: there too, the signature must come from your main wallet.
  • Approve another API wallet.

Its scope has widened over Hyperliquid's updates (transfers between your balances, staking). Treat its private key as a secret: only paste it into a service you trust.

What it does not protect

An API wallet prevents your account from being drained to another address. It does not prevent losses: whoever holds it can open leveraged positions, and a position can lose its whole margin or be liquidated. Only leave on that account what you accept to see traded. The no-withdrawal key

Its limits

  • An account can have one unnamed API wallet and three named ones, plus two named ones per sub-account.
  • It lives 180 days at most: you pick its lifetime when you create it.
  • Hyperliquid removes it when it expires, when you replace it, or when the account that created it no longer has funds.

Create it, replace it

  1. Open the API page

    On app.hyperliquid.xyz, with your wallet connected: “More” menu → “API”.

  2. Generate the API wallet

    Give it a name, click “Generate”, then “Authorize API Wallet” and sign with your main wallet. Write down the API wallet's private key: it is shown only once.

  3. To cut it off or replace it

    You can let it expire, or create a new API wallet with the same name (or a new unnamed one, if it was unnamed): Hyperliquid removes the old one. Never reuse its address: the documentation warns that previously signed actions could be replayed.

Connect your Hyperliquid account to lafo.trade, step by step

Check an address

Hyperliquid tells you, with no key, what an address is: an account, a sub-account, a vault, or an API wallet, and in that case for which account.

curl -s https://api.hyperliquid.xyz/info -H "Content-Type: application/json" \
  -d '{"type":"userRole","user":"0x…"}'

An “agent” answer gives the address of the account it signs for. To read balances and positions, query the account's address, not the API wallet's: otherwise the answer is empty.

At lafo.trade

Our robots only need an API wallet. The site refuses your main wallet's private key, encrypts the API wallet's key on receipt and never shows it again. We add no builder fee. When your API wallet reaches its expiry, you create a new one and replace the key in Accounts.

Sources