Enhanced: DhanHQ Data APIs with more Data and Higher Rate Limits

Hello Everyone,

Since the launch of DhanHQ v2 APIs, we have been constantly updating and enhancing our API offering, whether that be with first-in-industry features like 20-market depth over websockets and Super Orders or our updated latency speed on order execution.

One of the key value that we wanted to deliver with V2 APIs was access to data. A lot of our focus and improvements are to enhance Data API offerings, wherein a trader building their trading system can get all the data they require in a single place. And we have received a lot of requests here, from developers and traders.

Over the last few months, we have added updates to DhanHQ Data API offering, in terms of both data point availability and flexibility of use. And we have tried to make sure you never get rate limit issues on our APIs again.

Now, you can fetch upto 5 years of Historical Intraday Data for all equity instruments and active derivative contracts via DhanHQ. Along with this, we have also added Open Interest data, both for current day as well as historically for multiple timeframes across segments and instruments.

Along with this, we have tried to improve flexibility of use, with upto 100,000 Data API requests per day, just for Historical Data APIs itself. Also, we have removed per minute and per hour rate limits, so that you control at what frequency you want to poll the APIs for data.

This added with the separate rate limits on Market Quote APIs and Option Chain APIs, ensures that you can fetch data with flexibility and depending on your trading strategy and system. As we have expanded the data offering further, let’s summarise all the Data that you can get with DhanHQ:

All of this comes in a single Data API subscription. We have planned to keep the same pricing of ₹499 + taxes per month for all this data, which is a minimal fees, just to ensure that the data and infrastructure is not being abused.

Dhan was the first stock trading platform to separately provide Data & Trading APIs, and offer Trading APIs for free and charge only for Data API - a move that is now replicated by some of the larger players and set to become an industry standard. We love to innovate like this even beyond product, technology and infrastructure - it was a decision we made on our Day 1 and we are humbled to see this becoming a norm now.

Now, with DhanHQ Sandbox, you can even try out Historical Data APIs, for a list of stocks to check how the Data API works, without even having a Dhan account. We are building a lot more things on the DhanHQ API stack to make trading on APIs even easier.

Do let us know your feedback and what would make your journey on APIs even more seamless.

Happy Trading!

– Hardik
Product

7 Likes

Big bang enhancements for DhanHQ APIs. Loved it. Thanks @Hardik and Dhan.

Hi Hardik - Thanks for buiding the amazing product. I have concerns & I have highlighted the same to Dhan team - even though the products are good, documentation is not upto the mark - I tried to use RESTAPI & Python library - (tried mutiple times to figure out how to make it work in the last 2 months - with zero success). It would be extremely helpful - if you ppl make a video series (or extremely detailed hands on documentation with muliple examples) on how to use the REST API & your DhanHQ library (particularly websocker or marketfeed) → it will be extremely helpful and will also reach larger audience… Thanks in advance.

@Hardik

Hey @Sadha

Thanks for writing this down. We already have added examples in the python library, but primarily for Orders. Will do the same for Data as well.

On video series, will take your feedback and have something around implementation of the library/API as well.

Could you also provide an API to access stock metadata (e.g., scrip master CSV)? Currently, this data is shared as a CSV file. While parsing CSVs in Python is straightforward, handling them can be inconsistent across different programming languages. Providing this data in JSON format through an API would ensure a more consistent and developer-friendly experience across various platforms.

Hello @Vishal_Singh

Noted. Will try to assess the data output time for this and if feasible, will implement the same.

Hi @Hardik, I recently subscribed to Dhan API and am trying to implement some of the basic ones. I have a query regarding the Cancel Order API — does it exit (sell) my existing order?

I copied the entire documentation and gave it claude.ai to create the library in C#, it did it very well.