Skip to main content

SQUARE-OFF ALL ORDERS

This API enables position square-off operations for authorized end users through a middleware-based integration.

Multiple square-off requests can be submitted in a single API call by providing the order details for each position.

🔑 Header Parameters

FieldsTypeRequiredDescriptionExample
AuthorizationstringYesBearer token for authenticationaccess_token
x-api-keystringYesAPI key providedx-api-key

📦 Request Body Schema

FieldsTypeRequiredDescriptionExample/Enum
scrip_infoobjectYesScrip information can be sent using token or complete contract detailsSee below table
transaction_typestringYesWhether the square-off order is BUY or SELLSELL
product_typestringYesProduct type of the orderRefer Product Type Constants
order_typestringYesType of orderRL-MKT
quantityintegerYesNumber of quantity to transact100
pricenumberNoPrice at which order will be placed in rupees2500.50
trigger_pricenumberNoTrigger price applicable for Stop Loss orders2490.50
disclosed_quantityintegerNoQuantity disclosed to the market50
validitystringNoOrder validityDAY
is_amobooleanNoIndicates whether order is an AMO orderfalse
order_identifierstringNoOptional client reference (max 10 characters)SQOFF001
part_codestringNoParticipant codePART001
algo_idstringNoAlgo ID for strategy-generated ordersALG123
strategy_idstringNoStrategy ID for strategy-generated ordersSTRAT001
vender_codestringNoVendor code for in-house applicationsVEND001

📑 Scrip Info Object Fields

FieldsTypeRequiredDescriptionExample/Enum
exchangestringYesExchange segmentNSE_EQ
scrip_tokenintegerNoExchange token number1594
symbolstringNoTrading symbolINFY
seriesstringNoSeries applicable for equitiesEQ
expiry_datestringNoExpiry date for futures/options (yyyy-mm-dd)2026-07-30
strike_pricenumberNoStrike price for options1800000
option_typestringNoOption typeCE

🟢 Success Response - 200 OK

FieldsTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code"s-101"
messagestringSuccess message"Square-off request processed successfully"
dataarray(object)List of square-off order responsesSee below table

📘 Data Object Fields

FieldsTypeDescriptionExample
statusstringStatus of order placement"success"
codestringResponse code"s-101"
messagestringOrder-specific response message"Order Entry Sent to OMS"
dataobjectOrder response detailsSee below table

📘 Order Response Object Fields

FieldsTypeDescriptionExample
orderIdstringSystem-generated order identifier"SQOFFORD7789"

📝 Notes

  • Allows one or more open positions to be squared off through a single request.
  • Supports Equity, Derivatives, Currency, Commodity, and OTS segments.