Cancel order
Execution & Order Management (OMS)
/orders/{orderId}
Cancel order
deleteOrdersCancel a PENDING or WORKING order. A no-longer-cancellable order returns HTTP 409. BUY cash or SELL unit reservations are released atomically; inspect the canonical state before a new operation.
Parameters
orderIdstringpathRequiredExample: ord_abc123xyz
Headers
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Idempotency-KeystringheaderRequiredUnique string that makes write calls safe to retry on network failure. Required for money movement, trading, KYC, subscriptions, and webhook creation. Deduplicated for 24 hours -- duplicate keys return the cached response. HTTP 409 if a concurrent request with the same key is still in progress.
Example: dep_user42_1743152580
Response fields
orderIdstringstatusCANCELLEDrefundednumberUSD amount returned to master wallet. Present for BUY orders only.
currencystringExample: "USD"
messagestringResponse codes
200Order cancelled. BUY escrow refunded atomically.409Order cannot be cancelled — it is no longer PENDING or WORKING (already PROCESSING, COMPLETED, or REJECTED).