Getting started
Connect a Dhan account
Link a Dhan account with your own DhanHQ API key and log in on Dhan once a day to trade it from every screen.
What you need
- A Dhan trading account with DhanHQ API access enabled.
- An API key and API secret created on web.dhan.co (DhanHQ Trading APIs). Set its redirect URL to the address shown in Connect (step 2).
- A plan that includes live accounts (see Billing).
Your Dhan password and 2FA are only ever typed on Dhan's own login page.
Connect
- Accounts → Add account → Dhan, give it a name.
- Click Connect. Copy the redirect URL into your Dhan API app.
- Enter your Dhan client ID, API key and API secret, then save. They are encrypted and kept only by the trading engine.
Log in each day
Click Log in to Dhan, sign in on Dhan's page and you are sent back to Accounts. Dhan sessions last up to 24 hours; the account shows when it ends. If you log in as a different Dhan client than the one on the account, the login is refused.
Balance
The dashboard shows Dhan's available and used funds (refreshed every minute while open).
Static IP and exchange rules (since 1 April 2026)
SEBI's retail algo framework applies to every order sent through a broker API, including orders sent through TradeBridge.
- Static IP. Dhan accepts order placement, modification and cancellation only from the static IP address registered in your DhanHQ API settings (IP whitelist). Requests from any other address are rejected. Reading data (balance, order book, positions, prices) works from any address.
- 10 orders a second. Up to 10 orders a second need no separate exchange registration. TradeBridge never sends faster than that per account.
- Your responsibility. Registering the IP, and staying within the broker's terms for API and third-party use, is between you and Dhan. If you are unsure whether your setup is allowed, ask Dhan's API support before trading.
Last updated