Trading
Wallets & trading keys
How the trading key (Hyperliquid API wallet) works, what is stored where, and how to revoke it.
Hyperliquid lets an account approve an API wallet (also called an agent wallet) to sign actions on its behalf. HyperVeil uses one as your trading key, so you don't need to confirm every order in your wallet.
How it works
- HyperVeil generates a new key pair in your browser.
- Your main wallet signs a one-time
approveAgentmessage that authorises that key's address for your account. Your wallet may ask to switch to Arbitrum first, because Hyperliquid's signatures use it. - Orders, cancels and leverage changes are then signed by the trading key.
The trading key only signs. Your account data is always read using your main wallet address.
What is stored where
| Item | Where |
|---|---|
| Your main wallet's private key | Your wallet only. HyperVeil never sees it. |
| Trading key | This browser tab's session storage only. It survives a reload, and is cleared when you close the tab or Disconnect. A new tab needs a new approval, and approving there replaces the key in the other tab. Never stored in localStorage or on any server. |
If your key is replaced in another session, the order panel says "Your trading key was replaced in another session. Approve again to keep trading."
| Your address and preferences | In your browser on this device |
|---|
What a trading key cannot do
Per Hyperliquid's docs, withdrawals and transfers to another address must be signed by your main wallet. A trading key cannot move funds out of your account, and HyperVeil never asks your main wallet to sign a withdrawal or a transfer to another address.
What your main wallet signs
- The trading-key approval, and Revoke agent.
- A deposit: one signature for the exact amount, then one deposit transaction. See Set up and fund your account.
- If your USDC is in your Hyperliquid spot balance, one signature to move it to your perps balance in the same account.
Revoking
Disconnect clears the trading key from this browser only. It does not revoke the key on Hyperliquid. To revoke it, use either:
- Revoke agent in HyperVeil: your main wallet signs a new approval that replaces the old trading key, so the old key can no longer sign for your account.
- Hyperliquid's API wallet settings: remove the key there.
A trading key can still place trades for your account while it is approved, so treat this device and browser as trusted.