Is there an api to set Trailing stop loss?

Hi, Just wanted to understand if there is a way to put a trailing Stop Loss on my position through an api call?

Hi @sugam192

Trailing Stop Loss is itself an algorithm, you can code it using the trigger order, basis LTP and open position.

@Naman You are very right on that, yes it can be implemented through code.

But here are the problems I see.
To update the TSL I will have to constantly monitor the position which will be done through regular polling and this will add to the throttling limits set by Dhan.

Any other alternatives?

@Naman just wanted to follow up on this.

Hi @sugam192

As of now, there is no direct API for Trailing Stop Loss order. So you have to manually code it.

@PravinJ pravin ji, could you please make Trailing Stop Loss order type available from API too, if it’s available on app/web means it’s doable from API too, it’s a Dhan’s unique feature, pls bring it to API too, Thanks

Hello @ramb

Yes, we are already evaluating it’s feasibility and looking into possibility of extending on APIs. As already in this thread:

However, we will explore if we can offer it directly on APIs as well.

Any update on trailing stoploss api please