SQUARE-OFF
This API allows you to square off open positions from the net position tab.
It can be used to exit positions based on type, exchange, token, or product type.
| Header | Type | Description | Example |
|---|
| Content-Type | string | Specifies the media type of the request | application/json |
| Authorization | string | Access token for authenticated requests | {{access_token}} |
| x-api-key | string | API key used to authorize the request | {{x-api-key}} |
📑 Request Body Parameters
| Field | Type | Required | Description | Example / Enum |
|---|
| client_id | string | No | Client ID for placing square-off orders | "CL12345" |
| type | string | No | Position type | "daily", "expiry" |
| exchange | string | No | Exchange segment | "NSE_EQ" |
| token | integer | No | Scrip token | 12345 |
| introp | integer | No | Interoperability flag (0 = OFF, 1 = ON) | 1 |
| product_type | string | No | Product type | "M" |
🟢 Success Response - 200 OK
Content-Type: application/json
| Field | Type | Description | Example |
|---|
| status | string | Status of API call | "success" |
| code | string | Response code to user request | "s-101" |
| message | string | Success message | "Positions squared off successfully" |
| data | array | List of square-off results | Refer to Data Object Fields |
📦 Data Object Fields
| Field | Type | Description | Example |
|---|
| scrip_token | string | Scrip token identifier | "12345" |
| symbol | string | Scrip symbol | "INFY" |
| status | string | Status of order placement | "success" |
| message | string | Result message | "Order placed successfully" |
| data | object | Order response | Refer below |
📘 Nested Data Object
| Field | Type | Description | Example |
|---|
| orderId | string | System-generated order identifier | "ORD654321" |