Skip to main content

Square-off All orders

This API is used to square-off (close) all open intraday or expiry-based positions across exchange ad segments.

🔑Header Parameters

FieldsTypeRequiredDescriptionExample/Enum
AuthorizationstringyesBearer token for authenticationaccess_token
Content_typestringyesMIME Typeapplication/JSON
x-api-keystringYesAPI key provided by bearerx-api-key

📦 Request body schema

FieldsTypeRequiredDescriptionExample/ENUM
typestringYesType of order "DAILY" for intraday or "EXPIRY" (for expiry-based square-off)DAILY
exchangestringYesExchange segmentsNSE_FO
tokenstringYesScrip token from scrip master file"123456"
product_typestringYesProduct typeDELIVERY
interopintegerNo0= exchange wise square off1= combined square of.Ignored if exchange is used"0"

🟢Success Responses - 200 OK

FieldsTypeDescriptionExample/Enum
statusstringAPI status"success"
codestringInternal status code"s-101"
messagestringResult messagge"Square off successfully"
dataarray of objectsArray containing details of each scrip squared offSee below table

📘 Data Array Object

FieldTypeDescriptionExample/Enum
scrip_tokenstringScrip token from exchange scrip master file"12"
symbolstringSymbol code from exchange scrip master file"ACC"
statusstringStatus message of the order"success"
messagestringDetailed message for the order"Order entry sent to OMS"
dataobjectAdditional order detailsSee beow tabe

📘 Data Object (Inside Each Item)

FieldTypeDescriptionExample/Enum
orderIdstringsystem generated Order ID"NWSYF00059"
post/transactional/v1/orders/squareoff