Cancel Orders

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"
  }
}
FieldTypeRequiredDescription
idStringNRequest ID. Echoed back in the response so you can match requests to responses.
actionStringYMust be cancel_orders.
argsObjectYCancellation parameters.
> exchangeTypeStringNCancel 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: 200000 means the batch cancellation request has been accepted. Orders are cancelled one by one on the exchange — monitor the Orders push channel for individual orderState: "CANCELLED" updates to track progress.

FieldTypeDescription
idStringRequest ID.
eventStringcancel_orders on success, error on failure.
codeLong200000 = batch cancellation request accepted. Any other value indicates an error — check msg for the reason.
msgString"Success" on success, or an error message explaining why the request was rejected.