Rate Limit: 1200 requests per 60 seconds
Tip:
You can cancel order by websocket after login.
Request
{
"id": "XXX",
"action": "cancel_order",
"args":
{
"clientOrderId": "XXXX",
"orderId": "XXX"
}
}
Field name | Type | Necessary | Remarks |
---|---|---|---|
id | String | N | client request id |
action | String | Y | cancel_order |
args | Object | Y | request params |
> orderId | String | N | Order ID |
> clientOrderId | String | N | Customer defined order ID ,only support letters(a-z) and numbers(0-9) |
Tip:Either orderId or clientOrderId must be sent. If both orderId and clientOrderId are provided, orderId takes precedence,note that you can only cancel orders in the NEW/OPEN/PARTIALLY_FILLED status,otherwise even if the api request successful, it does not mean that the order has been cancelled.
Response
Success example:
{
"id": "XXXX", // request id
"event": "cancel_order",
"code": "0",
"msg": "",
"data": {
"orderId": "XXXXX",
"clientOrderId": "XXXX"
}
}
Fail example:
{
"id":"***",
"event": "error",
"code": "60009",
"msg": "Cancel Order failed."
}
Field name | Type | Remarks |
---|---|---|
id | String | client request id |
event | String | Event |
code | String | Code |
msg | String | Msg |
data | Object | response data |
> orderId | String | Order ID |
> clientOrderId | String | Customer-defined order ID |