MODIFY / CANCEL MULTILEG / SPREAD ORDER API
This API allows you to modify or cancel an existing multileg / spread order from the order book.
Based on the order_flag, the request will either update the order details or cancel the order entirely.
🔗 Path Parameters
| Parameter | Type | Required | Description | Example |
|---|
| order_flag | string | Yes | Action to perform (modify / cancel) | "cancel" |
| gateway_order_no | string | Yes | Gateway order reference number | "AAAEE00005" |
| 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 / Enum |
|---|
| client_id | string | No | Client ID for order modification | "CL12345" |
| type | string | Yes | Type of multileg order | "SPREAD", "2L", "3L" |
| order_type | string | No | Order type (RL / RL-MKT only) | "RL" |
| order_identifier | string | No | Custom tracking ID (≤10 chars) | "MLMOD1" |
| validity | string | No | Order validity | "IOC" |
| leg_details | array | Yes | Individual leg details | Refer below |
📦 Leg Details Object
| Field | Type | Required | Description | Example |
|---|
| leg_no | integer | Yes | Leg number | 1 |
| scrip_info | object | Yes | Instrument details | Refer below |
| transaction_type | string | No | BUY or SELL | "SELL" |
| quantity | number | No | Quantity per leg | 10 |
| price | string | No | Price per leg | "100.5" |
| others | object | No | Additional instrument attributes | Refer below |
📘 Scrip Info Object Fields
| Field | Type | Required | Description | Example / Enum |
|---|
| exchange | string | Yes | Exchange segment | "NSE_FO" |
| scrip_token | integer | No | Exchange token | 12345 |
| symbol | string | No | Symbol | "BANKNIFTY" |
| series | string | No | Series (equity only) | "EQ" |
| expiry_date | string | No | Expiry date (YYYY-MM-DD) | "2026-06-25" |
| strike_price | number | No | Strike price (options) | 42000 |
| option_type | string | No | Option type | "PE" |
🔧 Others Object Fields
| Field | Type | Description | Example |
|---|
| market_lot | integer | Lot size of the scrip | 25 |
| price_tick | number | Price tick size | 0.05 |
| decimal_loc | number | Decimal precision | 2 |
🟢 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 | "Order modified/cancelled successfully" |
| data | object | Order response payload | Refer to Data Object Fields |
📦 Data Object Fields
| Field | Type | Description | Example |
|---|
| orderId | string | System-generated order identifier | "ORD456789" |
| gateway_order_no | string | Gateway order reference number | "AAAEE00005" |
📝 Notes
"modify" → Updates the existing order
"cancel" → Cancels the order completely
- Only pending multileg orders can be modified or cancelled.
- All legs must be provided during modification.