How to Connect Dhan with Tradetron: Step-by-Step Guide

Huzefa Kudrati Updated Oct 3, 2026 5 min read

How to Connect Dhan with Tradetron: Step-by-Step Guide

To connect Dhan with Tradetron, generate an access token on Dhan (web.dhan.co → My Profile → DhanHQ Trading APIs → Access Token), then in Tradetron open Broker & Exchanges from the top-right menu, click Add Broker, choose DHAN, and enter the token and your Dhan Client ID. Your strategies can then place orders in your Dhan account.

Illustration of connecting a broker account to an automation platform

What you need before you start

  • 2 details from Dhan: Client ID and Access Token
  • 3 clicks in Tradetron to add the broker
  • 0 lines of code
  • An active Dhan trading account, with the segments you want to trade (for example F&O) enabled.
  • A Tradetron account. Sign up free if you don't have one.
  • Access to web.dhan.co on a browser to create the token.

Step 1: Get your Access Token and Client ID from Dhan

  1. Log in at web.dhan.co.
  2. Open My Profile.
  3. Go to DhanHQ Trading APIs.
  4. Generate an Access Token and copy it somewhere safe for the next step.
  5. Note your Client ID, shown in your Dhan profile.

Step 2: Add Dhan as a broker in Tradetron

  1. Log in to Tradetron and click your profile name at the top right.
  2. Choose Broker & Exchanges.
  3. Click Add Broker.
  4. Select DHAN from the drop-down.
  5. Enter your Client ID and the Access Token from Step 1, and save.

Tradetron profile menu with Broker & Exchanges highlightedProfile menu → Broker & Exchanges

List of Brokers screen in Tradetron with the Add Broker button highlightedClick Add Broker, then choose DHAN

Dhan now appears in your list of brokers, and you can pick it when you deploy a strategy.

Step 3: Deploy a strategy on Dhan

Connecting the broker doesn't trade anything by itself. A strategy trades only once you deploy it:

  1. Build a strategy in the no-code builder, or subscribe to one from the marketplace.
  2. Go to Strategies → My Strategies and click Deploy on it.
  3. Set the multiplier, choose the execution type, and select Dhan as the broker.
  4. Click Deploy.
Execution type What happens with Dhan selected
Live Offline The strategy runs and records every trade, but nothing is sent to the exchange
Live Auto Orders are placed automatically in your Dhan account

The full walkthrough, with screenshots of each screen, is in how to deploy a strategy in Tradetron.

When the access token expires

Dhan's access tokens are valid for a limited period that Dhan sets. Once a token expires, orders from Tradetron to Dhan fail until you replace it. To refresh:

  1. Generate a new Access Token on web.dhan.co under DhanHQ Trading APIs.
  2. In Tradetron, open Broker & Exchanges and edit the Dhan entry.
  3. Paste the new token and save.

Put a reminder in your calendar a day before the token's expiry so a live strategy never runs into it mid-session.

Troubleshooting the Dhan connection

Symptom Likely cause What to do
Orders rejected with an authentication error Token expired or pasted incorrectly Generate a new token and update it
Dhan isn't offered when deploying Broker not saved, or added under a different account Re-check Broker & Exchanges
F&O orders rejected Segment not active on your Dhan account Activate the segment with Dhan
Orders rejected for margin Not enough funds for the multiplier Lower the multiplier or add funds
Strategy runs but takes no trades A strategy issue, not a broker issue See how to debug a strategy

Every rejection is recorded in the deployment's Notification Log, under the menu on the Deployed tab. The message there usually names the cause.

Using another broker as well? See the guides for Zerodha and Angel One, or the broker comparison.

Frequently asked questions

How do I connect Dhan with Tradetron?

Generate an access token on web.dhan.co under My Profile → DhanHQ Trading APIs. Then in Tradetron go to Broker & Exchanges → Add Broker, choose DHAN, and enter the token and your Dhan Client ID.

Where do I find my Dhan access token?

Log in at web.dhan.co, open My Profile, go to DhanHQ Trading APIs and generate an Access Token there.

Why did my Dhan orders stop working?

The most common reason is an expired access token. Generate a new one on Dhan and update it in Tradetron's Broker & Exchanges. The Notification Log of the deployment shows the exact rejection message.

Do I need to keep my computer on for the strategy to run?

No. Tradetron runs your deployed strategies on its servers and sends orders to Dhan, so your computer can be off.

Can I test a strategy on Dhan without placing real orders?

Yes. Deploy it Live Offline: the strategy runs and records every trade, but nothing is sent to the exchange.

Is Dhan a SEBI-registered broker?

Yes, Dhan is a SEBI-registered stockbroker. You can check any broker's registration on SEBI's website.

Want to join Tradetron?

Thousands of traders have moved to algo trading. Leave your number and our team will help you get started.