Exit Positions by Filters
This API allows you to exit open positions that match a segment, side and product type.
USE CASE
Close every position of a chosen segment, side and product type in one request.
Details
segment,sideandproductTypeare all mandatory, and each takes a list. Example:segment[10,12],side[1,-1],productType["INTRADAY","CNC"].segmentvalues: 10 (Capital Market), 11 (Equity Derivatives), 12 (Currency Derivatives), 20 (Commodity Derivatives).sidevalues: 1 (buy side) and -1 (sell side). Pass both to cover both sides.productTypevalues: "INTRADAY", "CNC", "MARGIN" or "ALL".- This uses the same
DELETE /api/v3/positionsendpoint as Exit Position. To exit specific positions by id, use Exit Position by ID. - Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Description |
|---|---|---|
segment* | [ int ] |
|
side* | [ int] |
|
productType* | [ string ] |
|
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | Request status - ok / error |
code | int | Code identifying the specific response |
message | string | Message clarifying the request status, e.g. "The position is closed." |
Last updated on