Skip to main content

CANCEL ALL MULTILEG ORDERS API

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

📦 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"
statusstringCurrent order status"OPEN"
leg_detailsarrayIndividual leg detailsRefer respective schema

🟢 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"