Cancel Stop Loss & Target
This API allows you to cancel the Stop Loss and Take Profit of an open position.
USE CASE
Remove the exit levels from a position and manage the exit yourself.
Note
Only the parameter passed as null is cancelled. If a parameter is not included in the request, its existing value remains unchanged.
Details
- To cancel the Stop Loss or Take Profit added to an open position, use the Modify Stop Loss and Take Profit API and pass
nullfor the applicable parameter. - This uses the same API as Set stop-loss and target and Modify stop-loss and target.
- Cancel only Take Profit - send
{"positionId": "NSE:KWIL-EQ-INTRADAY", "takeProfit": null} - Cancel only Stop Loss - send
{"positionId": "NSE:KWIL-EQ-INTRADAY", "stopLoss": null} - Cancel both Stop Loss and Take Profit - send
{"positionId": "NSE:KWIL-EQ-INTRADAY", "takeProfit": null, "stopLoss": null} - The position itself stays open. Only the stop loss or take profit you pass as
nullis removed. positionIdis mandatory, for exampleNSE:KWIL-EQ-INTRADAY. Get it from Get Positions.- Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Description |
|---|---|---|
positionId* | string |
|
takeProfit | float / null | Pass null to cancel the Take Profit. If not included, the existing value remains unchanged |
stopLoss | float / null | Pass null to cancel the Stop Loss. If not included, the existing value remains unchanged |
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | Response status: ok / error |
code | int | Response code, e.g. 1102 on success |
message | string | Response message, e.g. Successfully modified order |
id_fyers | string | Internal Fyers reference id generated for the request |
Last updated on