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
ExachangestringYesExchange segmentsNSE EQ
order_idstringYesOrder ID is in URL encode formNWSYF00005>3

🔍Query Parameter (Only for Parent Order)

ParameterTypeRequiredDescriptionExample/ENUM
validitystringYesOrder Validity (e.g., DAY, GTC, etc.)DAY
validity_daysintYesValidity period (used for GTD orders)17

🔑Header Parameters

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

🟢Success Response - 200 Ok

FieldsTypeDescriptionExample/Enum
StatusStringStatus of API Call"sucess"
CodeStringcode indicating result"s-101"
messageStringHuman-readable message"All orders cancelled successfully"
dataStringDetailed result for each cancelled order"NSE_12345"

Notes 💬

  • Use URL encoding for order_id if it contains special characters (e.g., > becomes %3E).
  • Only pending orders can be cancelled.
  • Validity and validity_days are only required for parent order cancellations.
delete/transactional/v1/orders/regular/{exchange}/{order_id}