Skip to main content
POST
/
v1
/
exchange
/
cancel
Cancel Order
curl --request POST \
  --url https://api.hypereth.io/v1/exchange/cancel \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": {
    "type": "cancel",
    "cancels": [
      {
        "a": 0,
        "o": 127244980388
      }
    ]
  },
  "nonce": 1681923834000,
  "signature": {
    "r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
    "v": 27
  }
}'
{
  "status": "ok",
  "response": {
    "type": "cancel",
    "data": {
      "statuses": [
        "success"
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Hyperliquid uses a custom signing scheme for authentication.

Required for: All /exchange endpoints

Format: Signature generated using private key + nonce + action data

Headers:

  • Authorization: Signature
  • Content-Type: application/json

Important Notes:

  • Use official SDKs to avoid signing errors
  • Nonce must be current timestamp in milliseconds
  • Address fields must be lowercase
  • Order of fields in msgpack serialization matters

Common Pitfalls:

  • Not understanding the two signing schemes
  • Trailing zeros on numbers
  • Case sensitivity on addresses
  • Incorrect field ordering

Body

application/json
action
object
required
nonce
integer
required
signature
object
required

Response

Order canceled successfully

Order cancellation response

status
enum<string>
Available options:
ok,
err
response
object