Skip to main content

MODIFY COVER ORDER​

This API enables modification of existing Cover Orders for authorized end users through a middleware-based integration.

Only eligible pending Cover Orders can be modified.

🔗 Path Parameters​

ParameterTypeRequiredDescriptionExample
exchangestringYesExchange segment in which the Cover Order is placed"NSE_EQ"
order_idstringYesOrder ID of the Cover Order to be modified"NXWBB00002"

🔍 Query Parameters​

ParameterTypeRequiredDescriptionExample
userIdstringYesUser ID (UCC)"{{user_id}}"

🔑 Header Parameters​

HeaderTypeDescriptionExample
Content-TypestringRequest payload formatapplication/json
AuthorizationstringAccess token for authenticated requests{{access_token}}
x-api-keystringAPI key used to authorize request{{x-api-key}}

📦Request Body Schema​

FieldsTypeRequiredDescriptionExample/Enum
main_legobjectyesMain order detailsSee below table
stoploss_legobjectyesStop loss order detailsSee below table
leg_indicatorstringyesIndicates which leg is being modified. "2" refers to the stoploss leg"2"
product_sourcestringNoSource of the order. Allowed values: WEBAPI, MOBILEAPI (case-insensitive). Any other value is ignored without an error."WEBAPI"

📘Main Leg Object Fields​

FieldsTypeRequiredDescriptionExample/Enum
order_typestringyesOrder Types Allowed values: RL (Regular Limit) or RL-MKT (Regular Market)RL` / `RL-MKT
quantityintegeryesTotal quantity to transact100
traded_quantityintegeryesQuantity already traded (get from order book)40
pricenumberYesPrice must be 0 for RL-MKT type orders0

📘Stoploss Leg Fields​

FieldsTypeRequiredDescriptionExample/Enum
legsarray(object)yesArray of stop-loss leg orders.See below table

📘Inside Stop-loss legs array:​

FieldsTypeRequiredDescriptionExample/Enum
order_typestringYesOrder type for the SL leg. After SL is triggered, must be RL-MKT.RL-MKT
trigger_price_validationbooleanYesEnable trigger price validation. Must be true after SL is triggered.true
quantityintegerNoQuantity present. Currently ignored by the system.2625
pricenumberConditionalPrice at which SL should execute. Required for SL type only. Must be 0 after SL is triggered.0
trigger_pricenumberYesTrigger price that activates the stop-loss leg. Must be 0 after SL is triggered.0

⚠️ Important: After SL is triggered, price and trigger_price in the stoploss leg must always be 0.

🟢 Success Response - 200 OK​

Content-Type: application/json

FieldTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code"s-101"
messagestringCover Order modification success message"Cover order modified successfully"
dataobjectOrder response detailsRefer Data Object Fields

📦 Data Object Fields​

FieldTypeDescriptionExample
orderIdstringSystem-generated order identification number"NXWBB00002"