Trader's Control

P&L based exit

The P&L Based Exit API allows users to configure automatic exit rules based on cumulative profit or loss thresholds. When the defined limits are breached, all applicable positions are exited.
Notes : The configured P&L based exit remains active for the current trading day and is reset at the end of the session

post/pnlExit

Headers

access-tokenstring required

Request body

dhanClientIdstring

User specific identification generated by Dhan

profitValuenumber float

User-defined target profit amount for the PNL exit

lossValuenumber float

User-defined target loss amount for the PNL exit

enableKillSwitchboolean

Indicates if the kill switch is enabled for this PNL exit

productTypestring[]
Enum ValuesDescription
INTRADAYIntraday for Equity, Futures & Options
DELIVERYDelivery for equity deliveries

Response

Successful operation

messagestring
pnlExitStatusstring
Enum ValuesDescription
ACTIVEP&L based exit configured successfully
INACTIVENo active P&L based exit configured for the current trading day

Changes

No recorded changes to this endpoint across all 1 revision of this API.