sendAsset and agentSendAsset actions are POST requests to https://api.hyperliquid.xyz/exchange for moving tokens between perp DEX balances, spot balances, users, and/or subaccounts. If you need an account for API work, create a Hyperliquid account (referral link; supa.is may receive a referral reward). The field reference below is from the Hyperliquid exchange endpoint documentation as of 2026-11-17.
Shared request shape
Both actions use the same endpoint and the same Content-Type: application/json header.
| Field | Type | Requirement |
|---|---|---|
action | Object | Required. Contains the action type and action-specific fields. |
nonce | Number | Required. Recommended value is the current timestamp in milliseconds. It must match action.nonce. |
signature | Object | Required. |
sendAsset as a generalized method for transferring tokens between different perp DEXs, spot balance, users, and/or subaccounts. It also states that only the collateral token can be transferred to or from a perp DEX.
sendAsset fields
sendAsset is the user-signed transfer action. Its documented action object includes:
| Field | Type / value | Meaning |
|---|---|---|
type | "sendAsset" | Action type. |
hyperliquidChain | "Mainnet" or "Testnet" | Hyperliquid chain target. Use "Testnet" on testnet. |
signatureChainId | Hex string | Chain ID used when signing, in hexadecimal format. The docs give "0xa4b1" for Arbitrum as an example. |
destination | 42-character hexadecimal address | Recipient address. |
sourceDex | Perp DEX name, "", or "spot" | Perp DEX to transfer from. Use "" for the default USDC perp DEX and "spot" for spot. |
destinationDex | Perp DEX name, "", or "spot" | Perp DEX to transfer to. Use "" for the default USDC perp DEX and "spot" for spot. |
token | tokenName:tokenId | Token identifier. The docs use "PURR:0xc4bf3f870c0e9465323c0b6ed28096c2" as an example. |
amount | String | Amount of token to send, for example "0.01". |
fromSubAccount | 42-character hexadecimal address or "" | Subaccount address, or empty string if not transferring from a subaccount. |
nonce | Number | Current timestamp in milliseconds. It should match the outer nonce. |
agentSendAsset fields
agentSendAsset is similar to sendAsset, but it can be signed by an agent. The documented action object includes:
| Field | Type / value | Meaning |
|---|---|---|
type | "agentSendAsset" | Action type. |
destination | 42-character hexadecimal address | Recipient address. The docs state that the destination must match the source address. |
sourceDex | Perp DEX name, "", or "spot" | Perp DEX to transfer from. Use "" for the default USDC perp DEX and "spot" for spot. |
destinationDex | Perp DEX name, "", or "spot" | Perp DEX to transfer to. Use "" for the default USDC perp DEX and "spot" for spot. |
token | tokenName:tokenId | Token identifier. |
amount | String | Amount of token to send. |
fromSubAccount | 42-character hexadecimal address or "" | Subaccount address, or empty string if not transferring from a subaccount. |
nonce | Number | Current timestamp in milliseconds. It should match the outer nonce. |
agentSendAsset action object does not include hyperliquidChain or signatureChainId.
Key differences
sendAssetincludes the user-signed chain fieldshyperliquidChainandsignatureChainId.agentSendAssetcan be signed by an agent and omits those two fields in the documented schema.agentSendAssethas the documented destination restriction:destinationmust match the source address.- Both actions use the same documented default success response.
Example action objects
These are illustrative shapes using placeholder values for the schema fields; they are not a valid transfer. The documentation states that only the collateral token can be transferred to or from a perp DEX, so when sourceDex or destinationDex names a perp DEX (including "" for the default USDC perp DEX), token must be that DEX's collateral token rather than an arbitrary spot token such as PURR. Substitute a valid collateral token and real addresses before sending a request. The full request body also needs the outer nonce and signature.
sendAsset action (field-shape example only, not a valid transfer):
{
"type": "sendAsset",
"hyperliquidChain": "Mainnet",
"signatureChainId": "0xa4b1",
"destination": "0x0000000000000000000000000000000000000000",
"sourceDex": "<perp-dex-name-or-empty-or-spot>",
"destinationDex": "<perp-dex-name-or-empty-or-spot>",
"token": "<tokenName:tokenId>",
"amount": "0.01",
"fromSubAccount": "",
"nonce": 1763333333333
}
agentSendAsset action (field-shape example only, not a valid transfer):
{
"type": "agentSendAsset",
"destination": "0x0000000000000000000000000000000000000000",
"sourceDex": "<perp-dex-name-or-empty-or-spot>",
"destinationDex": "<perp-dex-name-or-empty-or-spot>",
"token": "<tokenName:tokenId>",
"amount": "0.01",
"fromSubAccount": "",
"nonce": 1763333333333
}
Like what you're reading? Try it yourself โ this link supports ChartedTrader at no cost to you.
Create a Hyperliquid account โ
Default success response
The documented 200: OK response for both actions is:
{
"status": "ok",
"response": {
"type": "default"
}
}
Scope
This reference covers only the documented request fields and default response for sendAsset and agentSendAsset. It does not document cross-chain withdrawal behavior, fees, or settlement timing for these actions. For broader API error handling, see Hyperliquid API Error Responses: Troubleshooting Guide (2026).
Create an account
If you are building against the Hyperliquid exchange endpoint, you can create a Hyperliquid account. This is a referral link; supa.is may receive a referral reward.
Continue with Hyperliquid
Browse the Hyperliquid guide hub for the complete user journey.