Station · macOS
BetaConnect Dhan
Create Dhan consent app credentials (Dhan Client ID, App ID, App Secret), register loopback redirect, paste in Station, then complete consent login in browser.
Last verified · Official docs: dhanhq.co
What you need
- Dhan trading account and DhanHQ developer app
- Dhan Client ID, App ID, and App Secret
- Redirect URL from this guide registered in Dhan consent app
- Mac with TradeAutopsy Station
Station fields for this broker: Dhan Client ID · App ID · App Secret.
Register loopback redirect in Dhan consent app. Station opens auth.dhan.co consent login; agent completes callback.
Redirect URL (register at broker)
Paste this exact URL in your broker developer app. Station listens on loopback port 9140 for the OAuth callback.
https://127.0.0.1:9140/api/daemon/broker/dhan/callbackPart 1: Get your keys from Dhan
1.Read dhanhq.co/docs/v2/ for consent-based authentication and app credentials. - Screenshot coming soonDhan developer portal
2.Sign in to DhanHQ developer portal. Copy Dhan Client ID, App ID, and App Secret for your consent app. - Screenshot coming soonDhan redirect URL
3.Register redirect URL https://127.0.0.1:9140/api/daemon/broker/dhan/callback in the Dhan app settings.
Part 2: Paste them into Station
- Screenshot coming soonStation Dhan fields
4.Station → Brokers → Dhan. Enter Dhan Client ID, App ID, and App Secret in the labeled fields. - Screenshot coming soonDhan consent browser login
5.Connect opens auth.dhan.co consent login in the browser. Agent completes the loopback callback.
Troubleshooting
- Redirect mismatch
- Dhan consent app must use the exact loopback callback URL from this guide.
- 401 after consent
- Regenerate App Secret in DhanHQ and reconnect.
Security notes
- App Secret in macOS Keychain on your Mac.
- Use read-only consent scopes where Dhan allows.
- Hosted TradeAutopsy does not store Dhan secrets.