Skip to main content

CANCEL MULTILEG/SPREAD ORDER

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

Only eligible Multileg or Spread Orders can be cancelled.

🔗 Path Parameters

ParameterTypeRequiredDescriptionExample
order_flagstringYesOrder action to be performed"cancel"
gateway_order_nostringYesGateway Order Number of the Multileg/Spread Order"AAAEE00005"

🔍 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: application/json

FieldsTypeRequiredDescriptionExample/ENUM
typestringyesType of multileg order"SPREAD" "2L" "3L"
order_typestringyesType of Order Supported : "RL" , "RL-MKT""RL"
validitystringyesOrder Validity. Usually: "IOC""IOC"
leg_detailsarray of objectyesDetails of each leg of the orderSee below table

📘Leg Details object fields

FieldsTypeRequiredDescriptionExample/Enum
leg_nointegerYesIdentifier of the leg1
scrip_infoobjectyesInstrument detailsSee below table
transactional_typestringyesBuy or sellSELL
quantitynumberyesQuantity for this leg75
pricestringYesPrice of the leg"250.50"
othersobjectYesLot size and price tick detailsSee below table

📑Scrip info object fields

FieldsTypeRequiredDescriptionExample/Enum
exchangestringyesExchange segmentsNSE_FO
scrip_tokenintegerOptionalUnique token id of the instrument123456
symbolstringOptionalSymbol of the scripRELIANCE 
seriesstringOptionalSeries (for equities)EQ
expiry_datestringOptionalExpiry date (yyyy-mm-dd) for F&O2025-06-05
strike_pricenumberOptionalStrike price in paise (for options)255000
option_typestringOptionaloption type: "CE" call or "PE" putPE

📑Others object fields

FieldsTypeRequiredDescriptionExample/Enum
market_lotintegerYesLot size75
price_ticknumberYesPrice movement increment0.05
decimal_locnumberYesDecimal locator for precision2

🟢Success Response - 200 OK

FieldsTypeDescriptionExample/Enum
StatusstringStatus of API Call"success"
CodestringResponse code"s-101"
messagestringConfirmation Message"Order submitted for cancellation"
dataobjectContain additional detailsSee below table

📄Data Object Info Field

FieldTypeDescriptionExample/Enum
order idstringInternal order ID assigned by system"SPRD12345"
gateway_order_nostringGateway order reference number"04567435