DhanHQ API
Access Data and Trading via APIs
dhanhq.co offers both ready-made algos and API integration options. If you have your own strategy and wish to integrate it using APIs for order placement, you can visit dhanhq.co, navigate to APIs, and select Trading APIs. Under this section, you will find all the required details to integrate API's with your own coding-based strategy. Please note that assistance for strategy coding is not provided.
On Dhan HQ, we also offer pre-built algos. Currently, more than 70 algos are available on the platform in collaboration with Stratzy. There is no need to create a separate account. You can log in using the same email ID and mobile number registered with your Dhan account. Once an algo is deployed, the applicable amount will be deducted directly from your Dhan ledger.
The algos are available on a subscription basis, with monthly, quarterly, and yearly plans. When you click on the Deploy button, the pricing details for the selected algo will be displayed.
Additionally, we offer the Stratzy All Access Pass, which provides access to all strategies under a single subscription at ₹17,999 per month. To subscribe, you may search for any strategy, click on “Deploy,” and select the Stratzy All Access Pass option. You can explore the available algos here: https://dhanhq.co/algos
Additionally, please note that Dhan provides two types of API's:
A. Trading API
This API is free of cost and can be used for:
1. Order placement
2. Position management
3. Statement and reports
4. Order postbacks
5. CDSL authorization
6. Portfolio and funds management
B. Data API
This requires a subscription of ₹499 + GST per month and provides access to :
1. Real-time market prices
2. Historical intraday data up to 5 years
3. Complete daily timeframe data
4. 20-level and 200-level market depth
5. Option chain data
6. Expired option data
To access the Data API :
1.Log in to web.dhan.co
2. Click on Profile and navigate to Access DhanHQ APIs → Data APIs
3. Complete the subscription payment (ensure sufficient funds in your Dhan account)
4. Generate your Access Token / API Key to start using the Data APIs
For complete API documentation, please refer - docs.dhanhq.co
Related FAQs

