Dhan Integration
Connect your Dhan account to Algrow using the DhanHQ API.
DhanHQ API
dhanhq.co
Prerequisites
- Active Dhan trading account
- DhanHQ API access (free for all Dhan users)
Generate API Credentials
Log in to DhanHQ Portal
Visit dhanhq.co and log in with your Dhan credentials. Navigate to the API section.
Generate Access Token
Click "Generate Token" to create a long-lived access token. Copy and store the token securely — it won't be shown again.
Note Your Client ID
Your Dhan Client ID is displayed on the API dashboard. You'll need both the Client ID and Access Token.
Connect to Algrow
Enter Credentials in Algrow
Go to Broker → Connect Broker → select Dhan. Enter your Client ID and Access Token.
Verify Connection
Algrow will validate your token immediately. A green status indicator confirms successful connection.
Test Your Connection
- Check green status on Broker page
- Run a forward test with a simple strategy
- Verify order appears in Dhan's order book
Troubleshooting
Token Expired
DhanHQ tokens are long-lived but can expire if revoked or after extended inactivity. Generate a new token from the DhanHQ portal if you see authentication errors.
Order Placement Issues
Ensure the required trading segments (equity, F&O) are enabled on your Dhan account. Contact Dhan support to activate missing segments.