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
AuthorizationstringYesBearer token for authenticationaccess_token
x-api-keystringYesAPI key providedx-api-key

📦 Request Body Schema

FieldsTypeRequiredDescriptionExample/Enum
typestringNoPosition type to be squared offexpiry
exchangestringNoExchange segmentNSE_FO
tokenintegerNoExchange token number of the scrip56838
intropintegerNoFlag indicating interoperability based position0
product_typestringNoProduct type of the positionM

🟢 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