Skip to main content

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

FieldsTypeRequiredDescriptionExample
ExchangeStringyesExchange segmentsNSE_EQ
order_idStringyesorder ID in URL encode formNWSYF000283

📘Request body schema

FieldsTypeRequiredDescriptionExample/Enum
main_legobjectYesMain order legs to be modifiedSee below table
stoploss_legobjectYesStoploss order leg to be modifiedSee below table
profit_legobjectYesProfit order leg to be modifiedSee below table
fields_modifiedobjectYesFlags indicating which field are being updatedSee below table

📝Main Leg Object Fields

FieldsTypeRequiredDescriptionExample/Enum
order_typestringyesOrder Types: Only RL or RL-MKT supportedRL
quantityintegeryesModifief quantity of the order100
traded quantityintegeryesAlready traded quatity from order book20
pricenumberyesNew price for the main leg ( 0 for market )1525.00
traded pricenumberyesShould always be set to 00

📑Stoploss Leg Object Fields

FieldsTypeRequiredDescriptionExample/Enum
Legsarrary (object)YesList of stoploss order legsSee below table
TrailsobjectNoTrailing stoploss settingSee below table

📑Each leg Array Fields

FieldsTypeRequiredDescriptionExample/Enum
QuantityintegernoIgnored by system (sent as 0 or original quantity)100
pricenumberyesModified execution price of the stoploss leg1540.00
trigger_pricenumberyesTrigger price which SL should activate1510.00

📑Trail objects fields

FieldsTypeRequiredDescriptionExample/Enum
ltp_jump_pricenumbernoLTP increment required for SL to trail5.00
stoploss_jump_pricenumbernoAmount by which SL will trail once LTP moves2.00

📑Profit Leg Object Field

FieldTypeRequiredDescriptionExample/Enum
LegsArray (object)YesList of profit ordersSee below table

📑Legs Object Fields

FieldTypeRequiredDescriptionExample/Enum
QuantityintegernoIgnored by system (send as 0 or original quantity)100
PricenumberyesNew target price for the profile leg1560.00

📑Fields modified object fields

FieldsTypeRequiredDescriptionExample/Enum
main_leg_pricebooleanyesSet to true if main leg price is changedtrue
main_leg_qtybooleanyesSet to true if quantity is changedtrue
stoploss_leg_pricebooleanyesTrue if stoploss price or trigger price is updatedtrue
stoploss_trail_pricebooleanyesTrue if trailing stoploss values are changedtrue
profit_leg_pricebooleanyesSet to true if profit leg price is changedtrue

🟢Success Response - 200 Ok

FieldsTypeDescriptionExample/Enum
statusstringIndicates the result of API Call"success"
codestringResponse code corresponding to the request"s-101"
messagestringDescriptive message for the response"Success Message"

🔴 Error Response - 400 Bad Request

FieldTypeDescriptionExample
statusstringStatus of the API call Default Error"error"
codestringError code indicating the failure"e-101"
messagestringSpecific message explaining the reason for failed request."Error Message"
put/transactional/v1/orders/bracket/{exchange}/{order_id}