Square-off All orders
This API is used to square-off (close) all open intraday or expiry-based positions across exchange ad segments.
| Fields | Type | Required | Description | Example/Enum |
|---|
| Authorization | string | yes | Bearer token for authentication | access_token |
| Content_type | string | yes | MIME Type | application/JSON |
| x-api-key | string | Yes | API key provided by bearer | x-api-key |
📦 Request body schema
| Fields | Type | Required | Description | Example/ENUM |
|---|
| type | string | Yes | Type of order "DAILY" for intraday or "EXPIRY" (for expiry-based square-off) | DAILY |
| exchange | string | Yes | Exchange segments | NSE_FO |
| token | string | Yes | Scrip token from scrip master file | "123456" |
| product_type | string | Yes | Product type | DELIVERY |
| interop | integer | No | 0= exchange wise square off1= combined square of.Ignored if exchange is used | "0" |
🟢Success Responses - 200 OK
| Fields | Type | Description | Example/Enum |
|---|
| status | string | API status | "success" |
| code | string | Internal status code | "s-101" |
| message | string | Result messagge | "Square off successfully" |
| data | array of objects | Array containing details of each scrip squared off | See below table |
📘 Data Array Object
| Field | Type | Description | Example/Enum |
|---|
| scrip_token | string | Scrip token from exchange scrip master file | "12" |
| symbol | string | Symbol code from exchange scrip master file | "ACC" |
| status | string | Status message of the order | "success" |
| message | string | Detailed message for the order | "Order entry sent to OMS" |
| data | object | Additional order details | See beow tabe |
📘 Data Object (Inside Each Item)
| Field | Type | Description | Example/Enum |
|---|
| orderId | string | system generated Order ID | "NWSYF00059" |