Skip to main content

Cancel Multi Order Beta

Use this API to cancel all open orders in one go. You can filter by segment or tag to cancel specific orders, or cancel all open orders with a single request. This applies to both AMO and regular orders. The order_ids of the cancelled orders will be returned in the response.

Cancel Multi Order Limits and Rate Limits
  • A maximum of 200 orders can be cancelled in a single request. Any request exceeding this limit will be rejected.
  • The Cancel Multi Order API is subject to a different rate limit compared to the standard limits applied across the system. For more information on the rate limits for this API, please check here.

Header Parameters

NameRequiredTypeDescription
AuthorizationtruestringRequires the format Bearer access_token where access_token is obtained from the Token API.
AccepttruestringDefines the content format the client expects, which should be set to application/json.

Query Parameters

NameRequiredTypeDescription
segmentfalsestringThe segment associated with the open orders.
Possible values: NSE_EQ, BSE_EQ, NSE_FO, BSE_FO, MCX_FO, NCD_FO, BCD_FO.
tagfalsestringThe tag associated with the open orders.

Responses

Response Body

{
"status": "success",
"data": {
"order_ids": [
"1644490272000",
"1644490272001",
"1644490272003"
]
},
"errors": null,
"summary": {
"total": 3,
"success": 3,
"error": 0
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Possible values: success, partial_success, error.

success - when all the cancel order request are successful.
partial_success - when some cancel order request encountered errors.
error - when all the cancel order request encountered errors.
dataobjectSuccessful response data for cancel multi order request.
data.order_idsarrayList of reference order IDs associated with successfully cancelled orders.
errorsarrayAn array containing the main content of the error response for partial_success and error scenarios.
errors[].error_codestringA specific error code.
errors[].messagestringDescriptive error message.
errors[].property_pathstringIndicates which part of the request triggered the error. It can be null.
errors[].invalid_valuestringShows the value causing the error. It can be null.
errors[].instrument_keystringA Key of instrument for a specific order.
errors[].order_idstringOrder ID associated to specific order. It can be null.
summaryobjectA summary of the outcomes for the batch of orders processed, detailing total orders, successful completions, and errors.
summary.totalintegerThe total number of order present in the payload for cancel multi orders.
summary.successintegerIndicates the successful cancelled orders.
summary.errorintegerIndicates the unsuccessful cancelled orders.

Examples

A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.

DELETE /order/multi/cancel

Request

Base URL
https://api.upstox.com/v2
tag — query
segment — query
curl / cURL
curl -L -X POST 'https://api.upstox.com/v2/order/multi/cancel' \
-H 'Accept: application/json'