Cancel all of your open orders at once. You can optionally limit cancellation to a specific exchange. The response confirms LTP has accepted the batch cancellation request — individual orders are cancelled asynchronously. Monitor the Orders push channel for orderState: "CANCELLED" updates as each order is cancelled.
Rate Limit: 1200 requests per 60 seconds
Request
Send a cancel_orders action. If you omit exchangeType, all open orders across all exchanges will be cancelled.
{
"id": "XXX",
"action": "cancel_orders",
"args": {
"exchangeType": "BINANCE"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
id | String | N | Request ID. Echoed back in the response so you can match requests to responses. |
action | String | Y | Must be cancel_orders. |
args | Object | Y | Cancellation parameters. |
> exchangeType | String | N | Cancel orders on a specific exchange only: BINANCE, OKX, or EDX. If omitted, cancels all open orders across all exchanges. |
Response
The response is sent immediately after LTP accepts the batch cancellation request.
Success:
{
"id": "XXXX",
"event": "cancel_orders",
"code": 200000,
"msg": "Success"
}
Failure:
{
"id": "***",
"event": "error",
"code": "60009",
"msg": "Cancel Order failed."
}
code: 200000means the batch cancellation request has been accepted. Orders are cancelled one by one on the exchange — monitor theOrderspush channel for individualorderState: "CANCELLED"updates to track progress.
| Field | Type | Description |
|---|---|---|
id | String | Request ID. |
event | String | cancel_orders on success, error on failure. |
code | Long | 200000 = batch cancellation request accepted. Any other value indicates an error — check msg for the reason. |
msg | String | "Success" on success, or an error message explaining why the request was rejected. |
