Skip to main content
The Pacifica Python SDK provides a comprehensive example on using this endpoint.
POST /api/v1/orders/cancel

Operation Type (for Signing)

Header FieldTypeContent
"type"string"cancel_order"

Request Body

FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”symbol”stringrequiredTrading pair symbolBTC
”order_id”integerrequired (if no CLOID)Exchange-assigned order ID123
”client_order_id”Full UUID stringrequired (if no OID)Client-defined order IDf47ac10b-58cc-4372-a567-0e02b2c3d479
”agent_wallet”stringoptionalAgent wallet address69trU9A5…
“expiry_window”integeroptionalSignature expiry in milliseconds30000
{
  "account": "42trU9A5...",
  "signature": "5j1Vy9Uq...",
  "timestamp": 1716200000000,
  "symbol": "BTC",
  "order_id": 123,
  "agent_wallet": "69trU9A5...",
  "expiry_window": 30000
}

Response

  • Status 200: Order cancelled successfully
  {
    "success": true
  }
  • Status 400: Bad request
  {
    "error": "Order not found",
    "code": 400
  }
  • Status 500: Internal server error

Code Example (Python)

import requests

payload = {
    "account": "42trU9A5...",
    "signature": "5j1Vy9Uq...",
    "timestamp": 1716200000000,
    "symbol": "BTC",
    "order_id": 123
}

response = requests.post(
    "/api/v1/orders/cancel",
    json=payload,
    headers={"Content-Type": "application/json"}
)

data = response.json()
Cancel requests are not affected by any speedbumps.