Skip to Content

Cancel Multi Order

This API allows you to cancel multiple orders in a single request.

USE CASE

Cancel up to 10 pending orders at once, for example when your strategy needs to pull all its working orders.

Details

  • You can cancel upto 10 orders simultaneously via the API.
  • While cancelling Multi orders you need to pass an ARRAY containing the orders request attributes
  • Cancelling orders needs an app with the Order Placement permission.
  • Send an array with one object per order, each carrying the order id.
  • Only pending orders can be cancelled.
  • Cancel requests count towards the limit of 10 orders per second shared with placing and modifying. Requests beyond it are rejected.
  • The response has one entry per order with its own statusCode, message and id. Check every entry.
  • 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 seconds
  • X-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

AttributeData TypeDescription
id*string
  • Mandatory.
  • Eg: 119031547242

Response Attributes

AttributeData TypeDescription
sstringok / error
codeintThis is the code to identify specific responses
messagestringMessage to clarify the request status
dataarrayArray of individual cancellation results, one entry per order submitted in the request, in the same order
data[].statusCodeintHTTP status code for that individual order's cancellation. Eg: 200
data[].statusDescriptionstringHTTP status description for that individual order's cancellation. Eg: HTTP OK
data[].bodyobjectResult for this order. It has the same fields as the Cancel Single Order response.
data[].body.sstringok / error
data[].body.codeint
  • This is the code to identify specific responses
  • If 201 comes in code it implies that order request has been made but no acknowledgement has been received in this case check orderbook before placing order
data[].body.messagestring
  • Message to clarify the request status.
  • Eg: Successfully canceled order
data[].body.idstring
  • The order number of the canceled order.
  • Eg: 119031547242
Last updated on