Cancel Order by Client ID
Submits a request to cancel an open order by providing a valid client_id and the instrument_code of the order.
A client_id is unique per instrument, not per account, so instrument_code is required.
Note: If you have created multiple orders with the same
client_idon an instrument, only the most recent will be cancelled with this request. It is your responsibility to ensure uniqueness in your client_ids.
The call waits for the exchange to confirm the cancellation (up to 2 seconds). client_id must be a standard (RFC 9562) UUID.
Requires an API key with the TRADE scope. This endpoint is not rate-limited.
bearerAuthAuthorizationBearer <token>API key created in the One Trading UI, sent as Authorization: Bearer <token>. Each endpoint lists the key permission it needs.
client_id*stringuuidinstrument_code*stringThe instrument the order is on. Required: a client_id is unique per instrument, not per account.
OK
application/json- response
order_id*stringuuidclient_id*stringuuidaccount_id*stringuuidinstrument_code*stringtime*stringdate-timeside*stringprice*stringamount*stringtype*"LIMIT"Always LIMIT
"LIMIT"status*stringStatus of the first event the exchange sends for the order after the cancel request. Usually CANCELLED, but it can be another status, e.g. a fill, when the order was matching as the cancel arrived; check the order before relying on it.
curl -X DELETE 'https://api.onetrading.com/fast/v1/account/orders/client/?instrument_code=BTC_USDC'{ "order_id": "e4cc5059-b6dd-4e7e-9d22-2d3576333fab", "client_id": "316d076d-76f7-49c6-beb1-7831e0f93a9e", "account_id": "726288e6-a463-4f88-9068-024ae8f97a34", "instrument_code": "SOL_EUR", "time": "2024-11-14T15:56:37.417Z", "side": "SELL", "price": "150", "amount": "1", "type": "LIMIT", "status": "CANCELLED"}