Update on APIs: Now Unlimited Rate Limits on DhanHQ APIs

Hello Traders,

We aim to offer the best product experience to our users, working on feedback and improvising from time to time. Meanwhile, over last year, we have scaled our systems and improved core trading architecture, with 50% orders now executed in under 50 ms and 85% orders under 100 ms, even with > 20x volume increase in the past year.

This core trading infrastructure is what powers our APIs, which is used by 75+ platforms (including the likes of TradingView, smallcase, Stratzy, OI Pulse, and likes) and thousands of individual algo traders who are building their trading systems with DhanHQ Trading APIs.

For DhanHQ APIs, we have aimed to provide most liberal rate limits while attaining system uptime and low latency. This is why we have allowed a maximum order per second rate of 25 orders for our users, to ensure super traders can trade without worrying about rate limits.

When we introduced APIs, we introduced minute, hourly and daily rate limits to ensure that the APIs are not being exploited by polling in loops and ensure system stability. However, as we enhanced our infrastructure and built capability to handle multiple thousands of requests concurrently, we are now removing rate limits. There will be no rate limits on Non-Trading APIs for minute, hourly or daily levels.

The updated rate limits are as follows:

This is to make it more convenient for algo traders and coders to bank on our APIs, without worrying about rate limits and keeping that in check.

As we ramp up to launch our Market Feed APIs, we are ensuring our systems offer lowest latency possible on all our APIs. We constantly reiterate our products to adapt to requirements, and all your feedback helps us in building that.

Hardik
Product

7 Likes

@PravinJ It good if we address:

  • Make historical API FREE of cost at least EOD data if not intra day data. Already few brokers provide free historical data api. Is historical data API is adjusted for corporate actions? if not please provide adjusted data.
  • Currently it is not possible to place forever orders through API, please work on it.
  • Make tax p&l details available through api.
  • Dhan not tracks failed/unfilled/cancelled order details any where. It will be good if you provide the details of there orders(Atleast upto past 1 week back) through API and through UI(At least on Dhan Web platform)
1 Like

Hey @dhantrade

Good to see you here on community after so long!

  1. Data APIs (which includes Intraday as well as Historical) is currently free for traders who have done 25 F&O trades in last 30 days. This is simply to keep a check that only active traders are using the same and it is not getting exploited.
    And yes, Historical Data is adjusted for corporate action.
  2. This is on our roadmap, we plan to build and release this soon.
  3. Noted. Will evaluate this. Can you help us with how this will help you in your systematic trading, so that we keep the same in mind while looking at feasibility.
  4. This is a product tech call, earlier we did assess the need for this but post our interactions with traders, didn’t see this fulfilling any objective. Can you help us with your use case, will definitely look into that.

Hi @Hardik,
Thanks for the reply. Here are my comments

  1. Why you expect one to trade ONLY in F&O segment? I am also a active trader and I am not exploiting your API, I place my orders in cash market. Instead you put a condition like one should have holding value > 1 lakh or 2 lack etc. Also exchanges already provides EOD data free of cost to public, just we are providing the same through api.

    Happy to here that historical data is adjusted for corp actions, we are ahead of few others then!!!

  2. Thanks. Note here I also informed @PravinJ about a small change in forever order. i.e a forever order should trigger within the given period(between start date and end date) else it should cancel. it is helpful for a pull back trader who base his entry based on time.

  3. Few of stocks fetch short term tax gain and few long term, so our effective return will be different day by day. tax p&l will be very helpful to track our effective returns. Also very very helpful in tax harvesting during the month of March. Also it very helpful if api marks holding longterm and short term.

  4. Once forever order is triggered and placed no matter whether it is filled or cancelled or failed, there is no way to replace the same order. I want to replace the unfilled(because of no entry, or partially filled), failed(because of less margin, circuit limit etc) and cancelled(because of no entry till market close) orders next day or week.

    Here I want to replace the same order with unfilled quantity and same trigger and limit price. But I don’t have any clues about such orders either on any dhan platform(web, mobile etc) or through api.

I am a sole equities trader. why do you prioritize F&O traders over us equities trader. allow us entry to these APIs please. if you want, set limits to 50 equities trades per month but allow us.

1 Like

Hello @dhantrade
Thanks for the detailed explanation, really appreciate that!

  1. Understood. We are relooking at this condition of free Data APIs, now with Live Market Feed as well. Will keep in mind to solve for @Ninja’s point as well
  2. Yes, for this, will have to maintain another parameter, but will definitely try to incorporate
  3. It might be difficult to do all the calculation and serve the data over API, as there are multiple condition based calculation that needs to be performed while generating Tax P&L. Also, calculating LTCG and STCG on day-to-day basis for Net P&L is not something we aim to solve via API, as this calculation does not help your trades in real-time (more like post market or monthly exercise for any trader). We do have Trade History API, which has all the charges incurred on trades, which should be more helpful to calculate effective returns.
  4. Understood. This is then related to Forever Orders in particular, will definitely evaluate building this.

Hello @dhantrade @Ninja

We have released Level 2 data on Live Market Feed. Do try this out and let us know your feedback:

Hi,

As part of the data APIs, do you have any plans to provide EOD data in a single API call?

It doesnt make sense to make few 1000 api calls to fetch OHLCV data for each ticker.

Thanks.

Hello @ekveer

You can use Daily Historical Data for fetching Day OHLCV in single API, but it will have to be individual API calls for each ticker. The reason for keeping single API call for each instrument is because of the API response time that we optimise for.

Here’s the link to the same: Historical Data - DhanHQ Ver 1.0 / API Document

OK, Thanks @Hardik Appreciate your response.