SQUARE-OFF ALL ORDERS
This API enables position square-off operations for authorized end users through a middleware-based integration.
Multiple square-off requests can be submitted in a single API call by providing the order details for each position.
🔑 Header Parameters
| 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 |
|---|---|---|---|---|
| scrip_info | object | Yes | Scrip information can be sent using token or complete contract details | See below table |
| transaction_type | string | Yes | Whether the square-off order is BUY or SELL | SELL |
| product_type | string | Yes | Product type of the order | Refer Product Type Constants |
| order_type | string | Yes | Type of order | RL-MKT |
| quantity | integer | Yes | Number of quantity to transact | 100 |
| price | number | No | Price at which order will be placed in rupees | 2500.50 |
| trigger_price | number | No | Trigger price applicable for Stop Loss orders | 2490.50 |
| disclosed_quantity | integer | No | Quantity disclosed to the market | 50 |
| validity | string | No | Order validity | DAY |
| is_amo | boolean | No | Indicates whether order is an AMO order | false |
| order_identifier | string | No | Optional client reference (max 10 characters) | SQOFF001 |
| part_code | string | No | Participant code | PART001 |
| algo_id | string | No | Algo ID for strategy-generated orders | ALG123 |
| strategy_id | string | No | Strategy ID for strategy-generated orders | STRAT001 |
| vender_code | string | No | Vendor code for in-house applications | VEND001 |
📑 Scrip Info Object Fields
| Fields | Type | Required | Description | Example/Enum |
|---|---|---|---|---|
| exchange | string | Yes | Exchange segment | NSE_EQ |
| scrip_token | integer | No | Exchange token number | 1594 |
| symbol | string | No | Trading symbol | INFY |
| series | string | No | Series applicable for equities | EQ |
| expiry_date | string | No | Expiry date for futures/options (yyyy-mm-dd) | 2026-07-30 |
| strike_price | number | No | Strike price for options | 1800000 |
| option_type | string | No | Option type | CE |
🟢 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) | List of square-off order responses | See below table |
📘 Data Object Fields
| Fields | Type | Description | Example |
|---|---|---|---|
| status | string | Status of order placement | "success" |
| code | string | Response code | "s-101" |
| message | string | Order-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
- Allows one or more open positions to be squared off through a single request.
- Supports Equity, Derivatives, Currency, Commodity, and OTS segments.