Skip to main content

CANCEL ALL MULTILEG ORDERS

This API allows you to cancel existing multileg / spread orders from the order book.

  • If flag = true → Cancels all multileg orders
  • Otherwise → Cancels only the orders provided in the orders array

🔑 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
client_idstringNoClient ID for order cancellation"CL12345"
flagbooleanYesIf true, cancels all multileg orderstrue
ordersarrayNoList of orders to cancel (required if flag = false)Refer below
statusstringNoMultileg order status"OPEN", "CANCELLED"

📦 Orders Array Fields

FieldTypeDescriptionExample
typestringMultileg order type (SPREAD, 2L, 3L)"SPREAD"
validitystringOrder validity"IOC"
prot_percstringProtection percentage"5"
order_timeintegerOrder time1234567890
gateway_order_nostringGateway order number"AAAEE00005"
leg_detailsarrayIndividual leg detailsRefer respective schema

📦 Leg Details Object

FieldTypeRequiredDescriptionExample / Enum
leg_nointegerYesLeg number1
pricestringNoOrder price"100.5"
quantitynumberNoOrder quantity10
transaction_typestringNoBUY or SELL"BUY", "SELL"
scrip_infoarrayYesScrip detailsRefer below
othersobjectNoAdditional scrip attributesRefer Others Object

📘 Others Object Fields

FieldTypeDescriptionExample
market_lotintegerLot size of scrip50
price_ticknumberPrice tick size0.05
decimal_locnumberDecimal precision2

📘 Scrip Info Object Fields

FieldTypeRequiredDescriptionExample / Enum
exchangestringYesExchange segment"NSE_EQ", "BSE_EQ", "MCX_FO"
scrip_tokenintegerNoExchange token of the instrument (alternative to full details)12345
symbolstringNoSymbol of the instrument"RELIANCE"
seriesstringNoSeries (applicable for equity instruments)"EQ"
expiry_datestringNoExpiry date (YYYY-MM-DD), applicable for F&O"2026-06-25"
strike_pricenumberNoStrike price (options only)2500
option_typestringNoOption type"CE", "PE"
instrument_namestringNoInstrument type/name"EQ", "FUTIDX", "OPTIDX"

🟢 Success Response - 200 OK

Content-Type: application/json

FieldTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code to user request"s-101"
messagestringSuccess message"Orders cancelled successfully"
dataarrayList of order cancellation resultsRefer to Data Object Fields

📦 Data Object Fields

FieldTypeDescriptionExample
orderIdstringSystem-generated order identifier"ORD12345"
gateway_order_nostringGateway order reference number"AAAEE00005"
statusstringStatus of cancellation"success"
messagestringResult message"Order cancelled successfully"