Request
Unique request identifier for correlation
WebSocket API method. Must be
order.cancelRequest parameters containing authentication and order cancellation details
You must provide either
id or external_id in the params, but not both. The order must be active (open or partially executed) to be canceled.Response
Request identifier for correlation
HTTP status code (200 for success)
Canceled order details object
Error Response
Request identifier for correlation
HTTP error status code
Always null for error responses
Error details object
Examples
Success Response Example
Error Response Examples
Order Not Found
Order Already Canceled or Fully Executed
Usage Notes
- Order ID vs External ID: Provide either the internal order ID returned from order creation or the external ID you assigned when creating the order. Do not provide both.
- Order Status: Only active orders (status
openorexecuted_partially) can be canceled. - Already Canceled Orders: Attempting to cancel an already canceled or fully executed order will result in an error.
- Execution Guarantee: If part of the order was already executed before cancellation, you will receive the executed amount in the response.
- Request Correlation: Always use a unique
idin each request for proper correlation with responses.
Common Error Codes
| Error Code | Message | Description |
|---|---|---|
| 40401 | Order not found | The order ID or external ID does not exist |
| 40408 | Cannot cancel an already canceled or fully executed order | The order is no longer active |
| 40011 | Invalid signature | The signature is invalid or timestamp is expired |
| 40010 | Missing required parameters | Required parameters are missing from the request |