Learn how to authenticate with Hyperliquid through two distinct signing mechanisms. This guide covers L1 actions with phantom agents and user-signed actions for administrative operations.
Type | Chain ID | Domain | Purpose |
---|---|---|---|
L1 Actions | 1337 | ”Exchange” | Trading operations: order, cancel, cancelByCloid, modify, batchModify, scheduleCancel, updateLeverage, updateIsolatedMargin, vaultTransfer, subAccountTransfer |
User-Signed | 0x66eee | ”HyperliquidSignTransaction” | Administrative operations: approveAgent, usdSend, spotSend, usdClassTransfer, withdraw, approveBuilderFee, tokenDelegate |
Choose signing mechanism
Prepare the action
Add timestamp
Sign appropriately
Send the request
Action | Description | Category |
---|---|---|
order | Place new orders | Trading |
cancel | Cancel orders by order ID | Trading |
cancelByCloid | Cancel orders by client order ID | Trading |
modify | Modify existing orders | Trading |
batchModify | Modify multiple orders at once | Trading |
scheduleCancel | Schedule order cancellation | Trading |
updateLeverage | Adjust leverage for positions | Position Management |
updateIsolatedMargin | Manage isolated margin | Position Management |
vaultTransfer | Transfer between vault accounts | Internal Transfers |
subAccountTransfer | Transfer between sub-accounts | Internal Transfers |
noop | No operation (for testing signatures) | Utility |
Action | Description | Category |
---|---|---|
approveAgent | Authorize an agent wallet to trade on your behalf | Agent Management |
usdSend | Transfer USDC between accounts | Fund Transfers |
spotSend | Transfer spot tokens | Fund Transfers |
usdClassTransfer | Transfer between USD classes | Fund Transfers |
withdraw | Withdraw funds to Layer 1 | Withdrawals |
approveBuilderFee | Approve builder fee structures | Advanced |
tokenDelegate | Delegate token voting rights | Advanced |
get_timestamp_ms()
or Date.now()
exchange.approve_agent()
grouping
for orders)
https://api.hyperliquid-testnet.xyz
for testing