curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"type": "twapOrder",
"twap": {
"a": 0,
"b": true,
"s": "1.0",
"r": false,
"m": 60,
"t": true
}
},
"nonce": 1705234567890,
"signature": {
"r": "0x0000000000000000000000000000000000000000000000000000000000000000",
"s": "0x0000000000000000000000000000000000000000000000000000000000000000",
"v": 27
},
"vaultAddress": null
}
'{
"status": "<string>",
"response": {}
}curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"type": "twapOrder",
"twap": {
"a": 0,
"b": true,
"s": "1.0",
"r": false,
"m": 60,
"t": true
}
},
"nonce": 1705234567890,
"signature": {
"r": "0x0000000000000000000000000000000000000000000000000000000000000000",
"s": "0x0000000000000000000000000000000000000000000000000000000000000000",
"v": 27
},
"vaultAddress": null
}
'{
"status": "<string>",
"response": {}
}action (object, required) — The action object containing:
type (string) — Must be "twapOrder"a (integer) — Asset indexb (boolean) — Is buy orders (string) — Total sizer (boolean) — Reduce onlym (integer) — Duration in minutest (boolean) — Randomize slice timingnonce (number, required) — Current timestamp in milliseconds (must be recent)signature (object, required) — EIP-712 signature of the actionvaultAddress (string, optional) — Address when trading on behalf of a vault or subaccountstatus — "ok" if request processedresponse — Contains action result datacurl -X POST https://api.hyperliquid.xyz/exchange \
-H "Content-Type: application/json" \
-d '{
"action": {"type": "twapOrder"},
"nonce": 1234567890123,
"signature": {...}
}'
Was this page helpful?