DhanHQ Superfast Trading APIs Update: Trading APIs are now FREE for all

Is trading API requires payment?
I read it in the first post that it will be free of cost !!

Hello @Saurabh

Yes. Trading APIs are absolutely free for all Dhan users. In fact, even Data APIs are free to use if you have made 25 F&O trades or more in the past 30 days on Dhan.

Thats strange!
Because to activate API and get the token, I had to pay INR 499 for 30 days !!!

That should be for Data APIs only. If you haven’t made 25 F&O trades in the last 30 days, you have the option to pay β‚Ή499 to get Data API access.

Other than that, Dhan Trading APIs are free always!

@Hardik is there to provide api to trailing stop loss after target % achieved? In Zerodha we can specify upfront both profit & loss % while taking order.

Hello @raghu

You can use custom scrips to add trailing stop loss as % and combine it with our order placement API. We want to keep order execution simple. You can look into placing BO orders and other order types which allow you to add SL and target legs along with the order, however you need to add absolute values in those fields.

Does API provide facility to place OCO Sell order to set Target-SL for Intraday Buy positions in Stock Options (not Index options)? If yes, please guide or provide some documentation

Hello @amitj

Welcome to Dhan Community!

We are yet to offer OCO forever orders on API. You can place two separate SL orders for Stop Loss and Target leg for now.

@Hardik But, in that case, we will need to maintain more amount as it will not be considered as closing the existing position. Any workaround for that?

Also, do you have any timelines for OCO using API?

@amitj I get your point here. Currently, I cannot think of any workaround here.

But we are working on Forever OCO order API, so rest assured, that will be released soon.

@Hardik Thanks Hardik. If you can provide any timelines for OCO in API depending upon your book of work, that would be much helpful.
Meanwhile will need to trade with other broker purely for OCO because OCO removes much headache post position is taken. Waiting for positive response from your side

@amitj

Hard to commit a timeline here. But rest assured, we will release it first in the community itself.

@Dhan_Help Don’t you still have an test environment?

Hello @Stanislav_Gorchakov

Welcome to Dhan Community!

We do not have test environment, as all user credentials are linked to live markets itself. You can use api.dhan.co to poll APIs from frontend though, and get API wrappers in any language that you want.