Modify Bracket Order
Use this API to modify an existing Bracket Order (main leg + stoploss leg + profit leg) that is still pending in the order book.
🛣️Path Parameters
| Fields | Type | Required | Description | Example |
|---|
| Exchange | String | yes | Exchange segments | NSE_EQ |
| order_id | String | yes | order ID in URL encode form | NWSYF000283 |
| Fields | Type | Required | Description | Example/ENUM |
|---|
| Authorization | string | no | Bearer token for authentication | access_token |
| x-api-key | string | no | API key provided by bearer | x-api-key |
📘Request body schema
| Fields | Type | Required | Description | Example/Enum |
|---|
| main_leg | object | Yes | Main order legs to be modified | See below table |
| stoploss_leg | object | Yes | Stoploss order leg to be modified | See below table |
| profit_leg | object | Yes | Profit order leg to be modified | See below table |
| fields_modified | object | Yes | Flags indicating which field are being updated | See below table |
📝Main Leg Object Fields
| Fields | Type | Required | Description | Example/Enum |
|---|
| order_type | string | yes | Order Types: Only RL or RL-MKT supported | RL |
| quantity | integer | yes | Modifief quantity of the order | 100 |
| traded quantity | integer | yes | Already traded quatity from order book | 20 |
| price | number | yes | New price for the main leg ( 0 for market ) | 1525.00 |
| traded price | number | yes | Should always be set to 0 | 0 |
📑Stoploss Leg Object Fields
| Fields | Type | Required | Description | Example/Enum |
|---|
| Legs | arrary (object) | Yes | List of stoploss order legs | See below table |
| Trails | object | No | Trailing stoploss setting | See below tabe |
📑Each leg Array Fields
| Fields | Type | Required | Description | Example/Enum |
|---|
| Quantity | integer | no | Ignored by system (sent as 0 or original quantity) | 100 |
| price | number | yes | Modified execution price of the stoploss leg | 1540.00 |
| trigger_price | number | yes | Trigger price which SL should activate | 1510.00 |
📑Trail objects fields
| Fields | Type | Required | Description | Example/Enum |
|---|
| ltp_jump_price | number | no | LTP increment required for SL to trail | 5.00 |
| stoploss_jump_price | number | no | Amount by which SL will trail once LTP moves | 2.00 |
📑Profit Leg Object Field
| Field | Type | Required | Description | Example/Enum |
|---|
| Legs | Array (object) | Yes | List of profit orders | See below table |
📑Legs Object Fields
| Field | Type | Required | Description | Example/Enum |
|---|
| Quantity | integer | no | Ignored by system (send as 0 or original quantity) | 100 |
| Price | number | yes | New target price for the profile leg | 1560.00 |
📑Fields modified object fields
| Fields | Type | Required | Description | Example/Enum |
|---|
| main_leg_price | boolean | yes | Set to true if main leg price is changed | true |
| main_leg_qty | boolean | yes | Set to true if quantity is changed | true |
| stoploss_leg_price | boolean | yes | True if stoploss price or trigger price is updated | true |
| stoploss_trail_price | boolean | yes | True if trailing stoploss values are changed | true |
| profit_leg_price | boolean | yes | Set to true if profit leg price is changed | true |
🟢Success Response - 200K
| Fields | Type | Description | Example/Enum |
|---|
| Status | string | Status of API Call | "SUCCESS"  |
| code | string | Response code | "s-101" |
| message | string | Success Message | "order modification sent to OMS" |
| data | object | Contains additional detail like order ID | See below |
📘Data Object Field
| Fields | Type | Description | Example/Enum |
|---|
| orderId | string | ID of the modified order | "NWSYF0027?3" |