Dhan Broker Algo Trading Setup — API Connection on AlgoCrab
Complete guide to enabling Dhan API access and connecting your account to AlgoCrab for automated trading on NSE and BSE.
16 June 2026 · 8 min read
Dhan API overview
Dhan offers a modern trading API popular among active F&O traders. AlgoCrab supports Dhan for order placement, positions, and historical data used in backtests.
You need a Dhan trading account with API access enabled from the Dhan developer portal.
Enable API and get credentials
Visit the Dhan developer section and create an application. Copy your client ID and access token workflow details.
Follow Dhan's documentation for token refresh — AlgoCrab handles session management once initial connection succeeds.
Link Dhan on AlgoCrab
Select Dhan in Connect Broker, enter credentials, and authorize. Test with a small market order or limit order far from LTP to confirm routing.
Check order book and trade book in AlgoCrab broker panel to verify fills are syncing correctly.
Best practices
Dhan users often run options algos — ensure margin checks are enabled before live deployment.
Keep API rate limits in mind when running multiple strategies on the same account.