POST request to https://api.hyperliquid.xyz/exchange with action.type set to approveAgent. The documented successful response is:
{
"status": "ok",
"response": {
"type": "default"
}
}
The following is based on the Hyperliquid exchange endpoint documentation available on 2026-11-17.
Endpoint and header
| Item | Value |
|---|---|
| Method | POST |
| URL | https://api.hyperliquid.xyz/exchange |
| Required header | Content-Type: application/json |
Required approveAgent fields
| Field | Type | Description |
|---|---|---|
action.type | String | Must be approveAgent. |
action.hyperliquidChain | String | Use Mainnet on mainnet, or Testnet on testnet. |
action.signatureChainId | String | Chain ID used when signing, in hexadecimal format. The documentation gives 0xa4b1 as the Arbitrum example. |
action.agentAddress | String | API wallet address in 42-character hexadecimal format. |
action.agentName | String, optional | Optional name for the API wallet. A custom expiration can be appended as valid_until {timestamp} after the name. |
action.nonce | Number | Current timestamp in milliseconds. It must match the outer nonce. |
nonce | Number | Outer request nonce. The documentation recommends using the current timestamp in milliseconds. |
signature | Object | Required signature object. The exchange endpoint documentation points to the Python SDK for code to generate signatures for these requests. |
agentName slot limits and expiration
The documentation states the following limits:
- An account can have 1 unnamed approved wallet and up to 3 named approved wallets.
- An additional 2 named agents are allowed per subaccount.
- A custom expiration can be set by appending
valid_until {timestamp}after the agent name. - The expiration can be at most 180 days in the future.
bot valid_until <timestamp>
Example payload
This is a reference payload structure, not a live-tested request. Replace the placeholder values and generate the required signature object with your signing implementation.
Like what you're reading? Try it yourself โ this link supports ChartedTrader at no cost to you.
Open a Hyperliquid account โ
payload = {
"action": {
"type": "approveAgent",
"hyperliquidChain": "Mainnet",
"signatureChainId": "0xa4b1",
"agentAddress": "0x0000000000000000000000000000000000000000",
"agentName": "bot valid_until <timestamp>",
"nonce": 1763376000000,
},
"nonce": 1763376000000,
"signature": generated_signature_object,
}
The inner action.nonce and outer nonce must match.
Expected response
The documented 200 response is:
{
"status": "ok",
"response": {
"type": "default"
}
}
Related references
- Hyperliquid API Agent Wallet Setup & Permissions (2026)
- Hyperliquid API Agent Wallet: Revoke & Fix (2026)
- Hyperliquid exchange endpoint documentation
Affiliate note
Open a Hyperliquid account โ The Hyperliquid link is an affiliate link and may earn a commission. Referred accounts receive a 4% fee discount on the first $25M of volume, excluding Vaults and sub-accounts.Continue with Hyperliquid
Browse the Hyperliquid guide hub for the complete user journey.