curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"type": "cancel",
"cancels": [
{
"a": 0,
"o": 123456789
}
]
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
},
"vaultAddress": null
}
'{
"status": "ok",
"response": {
"type": "cancel",
"data": {
"statuses": [
"success"
]
}
}
}curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"type": "cancel",
"cancels": [
{
"a": 0,
"o": 123456789
}
]
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
},
"vaultAddress": null
}
'{
"status": "ok",
"response": {
"type": "cancel",
"data": {
"statuses": [
"success"
]
}
}
}action (object, required) — The cancel action object containing:
type (string) — Must be "cancel"cancels (array) — Array of cancel objects with:
a (number) — Asset indexo (number) — Order ID to cancelnonce (number, required) — Current timestamp in milliseconds (must be recent)
signature (object, required) — EIP-712 signature of the action
vaultAddress (string, optional) — Address when trading on behalf of a vault or subaccountexpiresAfter (number, optional) — Timestamp in milliseconds after which the request is rejectedstatus — "ok" if request processedresponse — Contains cancellation details:
type — "cancel"data.statuses — Array of status results:
"success" — Order successfully cancelederror — Object with error message if cancellation failedcurl -X POST https://api.hyperliquid.xyz/exchange \
-H "Content-Type: application/json" \
-d '{
"action": {
"type": "cancel",
"cancels": [{
"a": 0,
"o": 77738308
}]
},
"nonce": 1234567890123,
"signature": {...}
}'
{
"status": "ok",
"response": {
"type": "cancel",
"data": {
"statuses": [
"success"
]
}
}
}
{
"status": "ok",
"response": {
"type": "cancel",
"data": {
"statuses": [{
"error": "Order was never placed, already canceled, or filled."
}]
}
}
}
{
"status": "ok",
"response": {
"type": "cancel",
"data": {
"statuses": [
"success",
{
"error": "Order was never placed, already canceled, or filled."
}
]
}
}
}
cancels array. Each cancellation is processed independently.Show child attributes
Current timestamp in milliseconds
EIP-712 signature of the action with r, s, v components
Show child attributes
Address when trading on behalf of a vault or subaccount (optional)
Timestamp in milliseconds after which the request is rejected (optional)
Was this page helpful?