Skip to main content

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

ParameterTypeRequiredDescriptionExample
order_flagstringYesAction to perform (modify / cancel)"cancel"
gateway_order_nostringYesGateway order reference number"AAAEE00005"

🔑 Header Parameters

HeaderTypeDescriptionExample
Content-TypestringSpecifies the media type of the requestapplication/json
AuthorizationstringAccess token for authenticated requests{{access_token}}
x-api-keystringAPI key used to authorize the request{{x-api-key}}

📑 Request Body Parameters

FieldTypeRequiredDescriptionExample / Enum
client_idstringNoClient ID for order modification"CL12345"
typestringYesType of multileg order"SPREAD", "2L", "3L"
order_typestringNoOrder type (RL / RL-MKT only)"RL"
order_identifierstringNoCustom tracking ID (≤10 chars)"MLMOD1"
validitystringNoOrder validity"IOC"
leg_detailsarrayYesIndividual leg detailsRefer below

📦 Leg Details Object

FieldTypeRequiredDescriptionExample
leg_nointegerYesLeg number1
scrip_infoobjectYesInstrument detailsRefer below
transaction_typestringNoBUY or SELL"SELL"
quantitynumberNoQuantity per leg10
pricestringNoPrice per leg"100.5"
othersobjectNoAdditional instrument attributesRefer below

📘 Scrip Info Object Fields

FieldTypeRequiredDescriptionExample / Enum
exchangestringYesExchange segment"NSE_FO"
scrip_tokenintegerNoExchange token12345
symbolstringNoSymbol"BANKNIFTY"
seriesstringNoSeries (equity only)"EQ"
expiry_datestringNoExpiry date (YYYY-MM-DD)"2026-06-25"
strike_pricenumberNoStrike price (options)42000
option_typestringNoOption type"PE"

🔧 Others Object Fields

FieldTypeDescriptionExample
market_lotintegerLot size of the scrip25
price_ticknumberPrice tick size0.05
decimal_locnumberDecimal precision2

🟢 Success Response - 200 OK

Content-Type: application/json

FieldTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code to user request"s-101"
messagestringSuccess message"Order modified/cancelled successfully"
dataobjectOrder response payloadRefer to Data Object Fields

📦 Data Object Fields

FieldTypeDescriptionExample
orderIdstringSystem-generated order identifier"ORD456789"
gateway_order_nostringGateway 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.