CANCEL ALL MULTILEG ORDERS
This API allows you to cancel existing multileg / spread orders from the order book.
- If
flag = true → Cancels all multileg orders
- Otherwise → Cancels only the orders provided in the
orders array
| Header | Type | Description | Example |
|---|
| Content-Type | string | Specifies the media type of the request | application/json |
| Authorization | string | Access token for authenticated requests | {{access_token}} |
| x-api-key | string | API key used to authorize the request | {{x-api-key}} |
📑 Request Body Parameters
| Field | Type | Required | Description | Example |
|---|
| client_id | string | No | Client ID for order cancellation | "CL12345" |
| flag | boolean | Yes | If true, cancels all multileg orders | true |
| orders | array | No | List of orders to cancel (required if flag = false) | Refer below |
| status | string | No | Multileg order status | "OPEN", "CANCELLED" |
📦 Orders Array Fields
| Field | Type | Description | Example |
|---|
| type | string | Multileg order type (SPREAD, 2L, 3L) | "SPREAD" |
| validity | string | Order validity | "IOC" |
| prot_perc | string | Protection percentage | "5" |
| order_time | integer | Order time | 1234567890 |
| gateway_order_no | string | Gateway order number | "AAAEE00005" |
| leg_details | array | Individual leg details | Refer respective schema |
📦 Leg Details Object
| Field | Type | Required | Description | Example / Enum |
|---|
| leg_no | integer | Yes | Leg number | 1 |
| price | string | No | Order price | "100.5" |
| quantity | number | No | Order quantity | 10 |
| transaction_type | string | No | BUY or SELL | "BUY", "SELL" |
| scrip_info | array | Yes | Scrip details | Refer below |
| others | object | No | Additional scrip attributes | Refer Others Object |
📘 Others Object Fields
| Field | Type | Description | Example |
|---|
| market_lot | integer | Lot size of scrip | 50 |
| price_tick | number | Price tick size | 0.05 |
| decimal_loc | number | Decimal precision | 2 |
📘 Scrip Info Object Fields
| Field | Type | Required | Description | Example / Enum |
|---|
| exchange | string | Yes | Exchange segment | "NSE_EQ", "BSE_EQ", "MCX_FO" |
| scrip_token | integer | No | Exchange token of the instrument (alternative to full details) | 12345 |
| symbol | string | No | Symbol of the instrument | "RELIANCE" |
| series | string | No | Series (applicable for equity instruments) | "EQ" |
| expiry_date | string | No | Expiry date (YYYY-MM-DD), applicable for F&O | "2026-06-25" |
| strike_price | number | No | Strike price (options only) | 2500 |
| option_type | string | No | Option type | "CE", "PE" |
| instrument_name | string | No | Instrument type/name | "EQ", "FUTIDX", "OPTIDX" |
🟢 Success Response - 200 OK
Content-Type: application/json
| Field | Type | Description | Example |
|---|
| status | string | Status of API call | "success" |
| code | string | Response code to user request | "s-101" |
| message | string | Success message | "Orders cancelled successfully" |
| data | array | List of order cancellation results | Refer to Data Object Fields |
📦 Data Object Fields
| Field | Type | Description | Example |
|---|
| orderId | string | System-generated order identifier | "ORD12345" |
| gateway_order_no | string | Gateway order reference number | "AAAEE00005" |
| status | string | Status of cancellation | "success" |
| message | string | Result message | "Order cancelled successfully" |