Skip to main content

Cancel Order

This API allows users to cancel an existing order (parent or child) on a specified exchange.

🛣️Path Parameters

FieldsTypeRequiredDescriptionExample/Enum
ExchangestringYesExchange segmentsNSE_EQ
order_idstringYesOrder ID is in URL encoded formNWSYF00005>3

🔍 Query Parameters (GTD Parent Orders Only)

ParameterTypeRequiredDescriptionExample
validitystringYes (GTD)Validity of the GTD order being cancelled"GTD"
validity_daysintegerYes (GTD)Validity days for the GTD order17

🔑Header Parameters

FieldsTypeRequiredDescriptionExample/ENUM
AuthorizationstringYesYour access token to authorize the requestaccess_token
Content_typestringYesFormat of the data being sent.application/json
x-api-keystringYesYour API key for authenticationx-api-key

🟢Success Response - 200 OK

FieldsTypeDescriptionExample/Enum
StatusStringStatus of API Call"success"
CodeStringcode indicating result"s-101"
messageStringHuman-readable message"All orders cancelled successfully"
dataStringDetailed result for each cancelled order"NSE_12345"
Important Notes
  • URL-encode order_id if it contains special characters (>%3E).
  • Only pending orders can be cancelled.
  • Validity and validity_days are required only for parent order cancellations.