API should allow to set SL and Target at same time for F&O

Can there be simple order API endpoints where normal F&O orders are placed with data like the buy price/market, SL and Target?

Existing APIs are complex and require lots of code handling which doesn’t even allow to put Target and SL simultaneously. If one exists then the other can’t be placed.

Hello @Dharmender

You can use BO order for the same, which allows you to place main order along with SL and Target at the same time.

Hi Hardik, BO is only for intraday, I feel same should be allowed in investments so we don’t have to wait till next day.

Hello @SiBe

Understood. Yes, this will be beneficial, maybe Forever Order combined with entry leg, will look into feasibility of this.

As the user, I want a normal order and it should allow me to provide SL and Target while ordering. Also, these values should be modifiable later on if required individually. If we have an existing order and we want to apply only SL or Target than that should also be allowed. I mean if you don’t allow such a paradigm then you put your customer at high risk. If not possible to accommodate these changes in the existing API then can there be a separate API for this?

Hello @Dharmender

As discussed above in the thread, you can use BO order for intraday trading. But if you are looking for positional trades, then yes, we are working around this.

1 Like

@Hardik @Dharmender’s concern about

BO is not allowed in F&O, isn’t it ?

Hello @dvpandya90

To clarify, BO is allowed for F&O instruments.

@Hardik Thank you for your response. it’s only for Index future. Not for Stock Future.

1 Like

@Hardik Bracket order only shows in the mobile application, I tried in the desktop (web) setup, BO for FnO doesn’t show up - only stop limit is there. When I place order directly from the chart, it shows stop limit and stop - BO option doesn’t exist there. Can you clarify on this.

Hello @Mayank_Kumar

Welcome to Dhan Community!

BO Order is available on all platforms. Do ensure that you are checking for liquid instruments in Index F&O to place BO orders.

Also, on charts, you have to open Dhan order window i.e. one shown when you click on Buy/Sell from top navigation panel.