| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Rate Limit:
The limits below apply to this operation. Binance perpetual, Binance spot and margin combined, and OKX across all business lines are counted separately.
Binance (all business lines)
- Rate Limit: 1200 requests per 60 seconds.
OKX (all business lines)
- Rate Limit: 30 requests per 2 seconds per symbol.
Cancel an open order. This endpoint is asynchronous — a successful response means the cancel request was accepted, not that the order has been cancelled. Monitor the final result via WebSocket (Orders channel) or by polling Query Order.
Request body: Request parameters must be sent as a JSON body, not as query string parameters.
Request
| Name | Type | Mandatory | Description |
|---|---|---|---|
orderId | String | N | Order ID |
clientOrderId | String | N | Customer-defined order ID |
Either
orderIdorclientOrderIdmust be sent. If bothorderIdandclientOrderIdare provided,orderIdtakes precedence. Note that you can only cancel orders in theNEW/OPEN/PARTIALLY_FILLEDstatus, otherwise even if the api request is successful, it does not mean that the order has been cancelled.
Response
| Field name | Type | Remarks |
|---|---|---|
orderId | String | Order ID |
clientOrderId | String | Customer-defined order ID |
orderState | String | Order State |
action | String | CANCEL_PENDING CANCEL_COMPLETE CANCEL_FAILED |
actionMsg | String | actionMsg |
Example Request
{
"orderId": "2106591138643265"
}Example Response
{
"code": 200000,
"message": "Success",
"data": {
"orderId": "1234567890123456",
"clientOrderId": "my-order-001",
"orderState": "OPEN",
"action": "CANCEL_PENDING",
"actionMsg": ""
}
}