Set Stop Loss & Target
This API allows you to add a Stop Loss and Take Profit to an open position.
USE CASE
Set your exit levels on a position after its entry order has traded.
Details
- This allows the user to add Stop Loss and Take Profit to an existing open position.
positionIdis mandatory, for exampleNSE:KWIL-EQ-INTRADAY. SendstopLoss,takeProfitor both.legTypeis optional: 1 = offset, 2 = percentage.qtyis optional and its maximum is the position quantity.- The same
PATCH /api/v3/positionsendpoint is used to modify and to cancel these levels later. - Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Description |
|---|---|---|
positionId* | string |
|
takeProfit | float | Take profit value |
stopLoss | float | Stop loss value |
qty | int | Optional. Max qty should be position qty |
legType | int | Optional. 1 = offset, 2 = percentage |
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | Request status, ok on success or error on failure |
code | int | Response code (e.g. 1102 on success) |
message | string | Status message, e.g. "Successfully modified order" |
id_fyers | string | Fyers-generated identifier for the position/order operation the stop-loss/target was attached to |
Last updated on