Endpoint
Description
Cancel one or more open orders by internal order ID.Request Body
| Parameter | Type | Description |
|---|---|---|
action* | object | See below |
action.type* | string | Must be "cancel" |
action.cancels* | array | See below |
action.cancels[].a* | string | number | Asset symbol or index (kept for compatibility), e.g., "BTC" or 0 |
action.cancels[].o* | string | Internal order ID (128-bit hex string) |
nonce* | number | Timestamp in milliseconds for replay protection, e.g., 1701234567890 |
expiresAfter | number | Optional expiration timestamp (ms) |
signature* | object | See below |
signature.r* | string | First 32 bytes of signature (hex string), e.g., "0x1234..." |
signature.s* | string | Second 32 bytes of signature (hex string), e.g., "0x5678..." |
signature.v* | number | Recovery ID (27 or 28) |
Response
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | ”ok” on success |
response.data.statuses | array | Status for each cancel request |
statuses[].success | boolean | true if cancel was committed |
statuses[].error | string | Error message (if failed) |
metadata.results | array | Detailed processing information |
metadata.results[].oid | string | Internal order ID from the request |
metadata.results[].status | string | ”committed”, “rejected”, “not_found”, etc. |
metadata.results[].orderId | string | Internal order ID (if found) |
Example Request
Error Responses
Notes
- Orders must be in “open” or “partial” status to be canceled
- Maximum 256 cancels per request
- Confirmation comes via
CancelConfirmed/CancelFailedevents