Skip to main content

CANCEL ALL MULTILEG ORDERS API

This API enables cancellation of Multileg Orders for authorized end users through a middleware-based integration.

Bulk cancellation can be performed by passing one or more Multileg/Spread Orders in the request payload.


🔍 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 Parameters

FieldTypeRequiredDescriptionExample
flagbooleanYesIf set to true, all specified Multileg orders will be cancelledtrue
ordersarrayYesList of Multileg/Spread Orders to be cancelledRefer Order Object Fields
statusstringNoCurrent status of the Multileg Order"OPEN"

📦 Order Object Fields

FieldTypeRequiredDescriptionExample
typestringYesType of Multileg Order"SPREAD"
validitystringNoOrder validity"IOC"
prot_percstringNoProtection percentage"5"
order_timeintegerNoOrder timestamp1688123456
gateway_order_nostringYesGateway Order Number"AAAEE00005"
leg_detailsarrayYesIndividual order leg detailsRefer Leg Detail Fields

📦 Leg Detail Fields

FieldTypeRequiredDescription
leg_nointegerYesLeg number
othersobjectNoAdditional scrip attributes
pricestringNoOrder leg price
quantitynumberNoOrder leg quantity
scrip_infoarrayYesScrip details for the leg
transaction_typestringNoBuy or Sell transaction type

📦 Other Attributes (others)

FieldTypeDescriptionExample
market_lotintegerLot size of the scrip50
price_ticknumberTick size of the scrip0.05
decimal_locnumberDecimal Locator2

📦 Scrip Information Fields (scrip_info)

FieldTypeDescriptionExample
exchangestringExchange segment"NSE_FO"
scrip_tokenintegerExchange token number of the instrument56838
symbolstringTrading symbol"NIFTY"
seriesstringSeries applicable for equities"EQ"
expiry_datestring (date)Expiry date in yyyy-mm-dd format"2026-07-30"
strike_pricenumberStrike price for options2500000
option_typestringOption type"CE"
instrument_namestringInstrument name"OPTIDX"

🟢 Success Response - 200 OK

Content-Type: application/json

FieldTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code"s-101"
messagestringSuccess message"Orders cancelled successfully"
dataarrayOrder-wise cancellation statusRefer Data Object Fields

📦 Data Object Fields

FieldTypeDescriptionExample
orderIdstringSystem-generated order identifier"25070100012345"
gateway_order_nostringGateway Order Number"AAAEE00005"
statusstringCancellation status of the order"CANCELLED"
messagestringOrder-specific response message"Order cancelled successfully"

📝 Notes

  • Used to cancel multiple Multileg or Spread Orders in a single request.
  • Supports:
    • Spread Orders (SPREAD)
    • Two-Leg Orders (2L)
    • Three-Leg Orders (3L)
  • flag should be set to true to initiate bulk cancellation.
  • Each order is processed independently and returns its own status and message.