Cancel Single Order
This API allows you to cancel an existing order.
USE CASE
Cancel an order that is still pending or open.
Note
To cancel only the linked Take Profit or Stop Loss without cancelling the parent order, use the Modify Order API and pass null for the applicable takeProfit or stopLoss parameter. Pass both parameters as null to cancel both.
Details
- Cancel pending orders via
DELETE /api/v3/orders/syncwith a JSON body containingid. You may alternatively useDELETE /api/v3/orders/{orderId}/syncwith the order id in the path instead of the body. - Cancelling orders needs an app with the Order Placement permission.
- Only pending orders can be cancelled.
- Cancelling a pending parent order also cancels its linked Take Profit and Stop Loss orders automatically.
- Cancel requests count towards the limit of 10 orders per second shared with placing and modifying. Requests beyond it are rejected.
- If the response code is 201, the request was made but not acknowledged. Check the order book before sending it again.
- For order types, product types, validations and sync vs async behaviour, refer to the Order Placement Guide.
- When order rate limiting is triggered, the API returns
429 Too Many Requests. - Retry timing is provided through response headers, not in the response body.
Retry-After— Wait time before retrying, in secondsX-Retry-After-Ms— Wait time before retrying, in milliseconds- Use the retry interval returned in the response headers before sending another order request.
- Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Description |
|---|---|---|
id* | string |
|
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | ok / error |
code | int |
|
message | string |
|
id | string |
|
Last updated on