CANCEL ALL ORDERS
This API enables cancellation of multiple orders for authorized end users through a middleware-based integration.
Orders can be cancelled individually by specifying order identifiers or in bulk based on the value of the cancellation flag.
🔍 Query Parameters
| Parameter | Type | Required | Description | Example |
|---|
| userId | string | Yes | User ID (UCC) | "{{user_id}}" |
| Header | Type | Description | Example |
|---|
| Content-Type | string | Request payload format | application/json |
| Authorization | string | Access token for authenticated requests | {{access_token}} |
| x-api-key | string | API key used to authorize request | {{x-api-key}} |
📑 Request Body Parameters
| Field | Type | Required | Description | Example |
|---|
| orders | array of strings | No | List of orders to be cancelled. Each entry should contain the Exchange Segment and Order ID. | `["NSE_EQ |
| flag | boolean | Yes | Flag indicating whether all eligible orders should be cancelled or only the specified orders. | true |
🟢 Success Response - 200 OK
Content-Type: application/json
| Field | Type | Description | Example |
|---|
| status | string | Status of API call | "success" |
| code | string | Response code | "s-101" |
| message | string | Success message | "Order cancellation request processed successfully" |
| data | array | Order-wise cancellation status | Refer Data Object Fields |
📦 Data Object Fields
| Field | Type | Description | Example |
|---|
| status | string | Status of order cancellation | "CANCELLED" |
| message | string | Order-specific response message | "Order cancelled successfully" |
| order_id | string | Order identifier | "NXVZO00098K1" |
📝 Notes
- Allows cancellation of multiple orders in a single request.
- If
flag is set to:
true → All eligible open/pending orders are cancelled.
false → Only the orders specified in the orders array are cancelled.
- Each order is processed independently and returns its own cancellation status.