Dhan Integration

Connect your Dhan account to Algrow using the DhanHQ API.

Dhan

DhanHQ API

dhanhq.co

Prerequisites

  • Active Dhan trading account
  • DhanHQ API access (free for all Dhan users)
DhanHQ API provides long-lived access tokens — no daily re-login required. This makes it one of the simplest brokers to set up.

Generate API Credentials

1

Log in to DhanHQ Portal

Visit dhanhq.co and log in with your Dhan credentials. Navigate to the API section.

2

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.

3

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

1

Enter Credentials in Algrow

Go to BrokerConnect Broker → select Dhan. Enter your Client ID and Access Token.

2

Verify Connection

Algrow will validate your token immediately. A green status indicator confirms successful connection.

Test Your Connection

  1. Check green status on Broker page
  2. Run a forward test with a simple strategy
  3. 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.