How to Create a Hyperliquid API Key for Your Bot
Set up API access for Hyperliquid, a decentralized exchange, by creating and funding a protocol wallet before configuring your trading bot.
For Gunbot, this setup creates Hyperliquid API keys for a Hyperliquid API trading bot. Keep the Hyperliquid private key and API wallet details private, because they control what the bot can do on your account.
Info
An API (Application Programming Interface) key for a decentralized exchange (DEX) like Hyperliquid lets your trading bot interact with the protocol. Unlike centralized exchanges, this often involves authorizing actions through your connected wallet.
Funding the Wallet
Before using Hyperliquid with Gunbot, connect your wallet and fund it:
- Visit the Hyperliquid portfolio page.
- Click the Connect button in the center of the page, or use the Connect option in the top menu bar.
- Select your wallet (e.g., MetaMask or any other supported wallet).
- Approve the connection in your wallet popup.

- In the Deposit tab:
- Choose a deposit chain from the dropdown list:
- Arbitrum One (recommended – lowest gas fees and fastest confirmation)
- Ethereum (Only ETH Deposits)
- Bitcoin (Only BTC Deposits)
- Select USDC as the deposit token.
- Enter the desired amount.
- Click the Deposit button.
- Confirm the transaction in your wallet.

Once funds are deposited, you’re ready to generate your API credentials.
Creating Hyperliquid API Credentials
- In the top menu, go to More > API.
- Enter a name for your key (e.g.,
Gunbot). - Paste your wallet address.
- Click Generate, then Authorize API Wallet.
- Save your public API key and secret securely.
Important
Never share your secret key with anyone.

Configuring Your Trading Bot
Set up your bot in the GUI using your Hyperliquid credentials:
- Access Settings: Open the bot’s Exchange configuration section.
- Select Market Type: Choose
"spot"or"swap"depending on whether you want to do Spot or Futures trading.Info
Select this market type first; it usually remains unchanged once set.
- Enter Credentials:
- API Key: Your Hyperliquid public API key.
- API Secret: Your generated secret key.
- Origin Wallet: The wallet address you connected to Hyperliquid.
- Verify all details carefully.
- Save Exchange: Confirm your exchange setup and proceed to Trading Settings.

Verification Steps
Complete these final checks:
- Save Configuration:
- Verify all API settings.
- Confirm credentials are saved.
- Test Connection:
- Add a trading pair.
- Check for data updates.
- Verify your account balance.
- Monitor initial operations.
A properly configured API supports reliable automated trading. Review API settings regularly, never share credentials, and use secure channels when setting up your HyperLiquid trading bot.