Endpoint
Request Body
| Parameter | Type | Description |
|---|---|---|
action* | object | See below |
action.type* | string | Must be "approveAgent" |
action.hyperliquidChain* | string | "Mainnet" or "Testnet" |
action.signatureChainId* | string | EIP-712 chain ID (hex), e.g., "0xa4b1" |
action.agentAddress* | string | Agent’s wallet address (use zero address to revoke), e.g., "0x1234567890abcdef..." |
action.agentName | string | Optional agent label, e.g., "My Trading Bot" |
action.nonce* | number | Timestamp in milliseconds (must match outer nonce) |
nonce* | number | Timestamp in milliseconds for replay protection, e.g., 1701234567890 |
signature* | object | See below |
signature.r* | string | First 32 bytes of signature (hex string), e.g., "0x1234..." |
signature.s* | string | Second 32 bytes of signature (hex string), e.g., "0x5678..." |
signature.v* | number | Recovery ID (27 or 28) |
Response
Example Request
Error Responses
Notes
- Use zero address (
0x0000000000000000000000000000000000000000) to revoke agent - Agent can sign any exchange action on your behalf
- Store agent private keys securely
action.noncemust equal the outernonce