Cancel Order
This API allows users to cancel an existing order (parent or child) on a specified exchange.
🛣️Path Parameters
| Fields | Type | Required | Description | Example/Enum |
|---|
| Exachange | string | Yes | Exchange segments | NSE EQ |
| order_id | string | Yes | Order ID is in URL encode form | NWSYF00005>3 |
🔍Query Parameter (Only for Parent Order)
| Parameter | Type | Required | Description | Example/ENUM |
|---|
| validity | string | Yes | Order Validity (e.g., DAY, GTC, etc.) | DAY |
| validity_days | int | Yes | Validity period (used for GTD orders) | 17 |
| Fields | Type | Required | Description | Example/ENUM |
|---|
| Authorization | string | Yes | Your access token to authorize the request | application/json |
| Content_type | string | Yes | Format of the data being sent. | acess_token |
| x-api-key | string | Yes | Your API key for authentication | x-api-key |
🟢Success Response - 200 Ok
| Fields | Type | Description | Example/Enum |
|---|
| Status | String | Status of API Call | "sucess" |
| Code | String | code indicating result | "s-101" |
| message | String | Human-readable message | "All orders cancelled successfully" |
| data | String | Detailed 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.