Astrum / Guides / Hyperliquid API wallet

How to create a Hyperliquid API wallet

An API wallet (also called an agent wallet) is a separate key that your Hyperliquid account approves to place trades for it. It can trade but it can’t withdraw, which is why bots use it. Here’s how to set one up safely.

Updated 1 November 2026 · Astrum

What an API wallet can and can’t do

  • Can: open and close positions and place or cancel orders for the account that approved it (and its sub-accounts).
  • Can’t: withdraw or move your funds out of Hyperliquid.
  • Expires: you choose how long it stays valid when you authorise it; after that it stops working.
  • Can be revoked: remove it at any time and anything using it stops trading immediately.
An API wallet still has full trading access. Only keep money in that account that you’re prepared to have traded, and never share your main wallet’s private key or seed phrase with anyone.

Step by step

  1. Open Hyperliquid and connect your wallet. Go to app.hyperliquid.xyz and connect the wallet that holds the account you want the bot to trade. For clean records, use an account (or sub-account) used only for the bot.
  2. Open the API page. In the menu, choose More → API, or go straight to app.hyperliquid.xyz/API.
  3. Name it and generate the key. Enter a name you’ll recognise, such as “Astrum”, and click Generate. Hyperliquid creates a new API wallet address and its private key.
  4. Copy the private key now. Save it somewhere safe before you leave the page; this is the secret key the bot uses. Treat it like a password.
  5. Authorise it. Click Authorize API Wallet, choose how many days it should stay valid (up to 180), and confirm the signature in your wallet.
  6. Hand it over securely. Give the bot the API wallet’s secret key and your account’s public address, through the secure method the provider gives you. Never paste keys into email, chat or a public form.

Menu names on Hyperliquid can change over time; if a label differs, look for the API section in the app menu.

Keeping it safe

  • One key per bot. Create a separate API wallet for each bot or service, so you can revoke one without affecting the others.
  • Don’t reuse old keys. Hyperliquid’s docs advise generating a new API wallet rather than re-authorising an old address.
  • Renew before it expires. Note the expiry date; when it’s close, generate a new key and send it over.
  • Revoke when you stop. On the API page, remove the API wallet. The bot loses access straight away.

Using it with Astrum

Astrum needs exactly two things: this API wallet’s secret key and your account’s public wallet address. No password, no seed phrase, no deposit. The account should hold at least $2,500 of margin per Bitcoin trade, with 2 times that ($5,000) in the account, or 2.5 times on the Aggressive profile.

Questions

Can a Hyperliquid API wallet withdraw funds?

No. API wallets can sign trades for the account that approved them, but they can’t withdraw. They can still lose money through trades, so only fund what you want traded.

How long is a Hyperliquid API wallet valid?

You choose when you authorise it, up to 180 days. After it expires it stops working and you create a new one.

How do I revoke an API wallet?

Open the API page on Hyperliquid and remove it. Anything using that key loses access immediately.

Run Astrum on your own Hyperliquid account

No upfront or monthly fee: 20% of new profits, and nothing in a month without them. Your funds never leave your account, and the key we use can’t withdraw.

Join the waitlist See every backtested day