Skip to main content

SQUARE-OFF

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

The API can be used to square off positions based on exchange segment, product type, position type, and specific scrip token.

🔑 Header Parameters

FieldsTypeRequiredDescriptionExample
Content-TypestringYesRequest payload formatapplication/json
AuthorizationstringYesBearer token for authenticationaccess_token
x-api-keystringYesAPI key providedx-api-key

📦 Request Body Schema

FieldsTypeRequiredDescriptionExample/Enum
typestringNoPosition type to be squared offexpiry
exchangestringNoExchange segmentSee "Exchange Values" below
tokenintegerNoExchange token number of the scrip56838
intropintegerNoFlag indicating interoperability based position0
product_typestringNoProduct type of the position"M", "D", "MF", "PT"

📘 Exchange Values (specific to this endpoint)

NSE_EQ, NSE_FO, MCXSX_FIM, NSEL_SPTCOM, BSE_EQ, BSE_FO, MCX_FO, MCX_SPOT, ICEX_FO, BSE_COMM, NSE_COMM, BSECOMM_SPOT, NSECOMM_SPOT, NCDEX_FO, NCDEX_SPOT, MSE_CUR, MSE_EQ, MSE_FO, MSE_SPOT, NSE_CUR, NSECUR_SPOT, BSE_CUR, BSECUR_SPOT, NSE_OTS, EQ Combined, FNO Combined, CDS Combined

🟢 Success Response - 200 OK

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

📘 Data Object Fields

FieldsTypeDescriptionExample
scrip_tokenstringExchange token number of the scrip"56838"
symbolstringTrading symbol"NIFTY"
statusstringSquare-off order status"success"
messagestringPosition-specific response message"Order Entry Sent to OMS"
dataobjectOrder response detailsSee below table

📘 Order Response Object Fields

FieldsTypeDescriptionExample
orderIdstringSystem-generated order identifier"SQOFFORD7789"

📝 Notes

  • Used to square off existing open positions.
  • Positions can be filtered using:
    • Exchange Segment
    • Product Type
    • Position Type
    • Scrip Token
  • Supports interoperability-based positions through the introp parameter.
  • Suitable for:
    • Position Exit
    • Day-End Square-Off
    • Expiry Position Management
    • Risk Management Activities