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.
| Fields | Type | Required | Description | Example |
|---|
| Authorization | string | Yes | Bearer token for authentication | access_token |
| x-api-key | string | Yes | API key provided | x-api-key |
📦 Request Body Schema
| Fields | Type | Required | Description | Example/Enum |
|---|
| type | string | No | Position type to be squared off | expiry |
| exchange | string | No | Exchange segment | NSE_FO |
| token | integer | No | Exchange token number of the scrip | 56838 |
| introp | integer | No | Flag indicating interoperability based position | 0 |
| product_type | string | No | Product type of the position | M |
🟢 Success Response - 200 OK
| Fields | Type | Description | Example |
|---|
| status | string | Status of API call | "success" |
| code | string | Response code | "s-101" |
| message | string | Success message | "Square-off request processed successfully" |
| data | array(object) | Position-wise square-off status | See below table |
📘 Data Object Fields
| Fields | Type | Description | Example |
|---|
| scrip_token | string | Exchange token number of the scrip | "56838" |
| symbol | string | Trading symbol | "NIFTY" |
| status | string | Square-off order status | "success" |
| message | string | Position-specific response message | "Order Entry Sent to OMS" |
| data | object | Order response details | See below table |
📘 Order Response Object Fields
| Fields | Type | Description | Example |
|---|
| orderId | string | System-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