Dhan Automation
Dhan automation places your orders on your own Dhan account exactly as you specified. We build it to your requirement, and Telegram, WhatsApp, Discord, TradingView or rules inside the software itself can feed it.
You run the software on your own PC or VPS, with your own Dhan token. AlgoDevelop is a software developer, not a SEBI-registered intermediary. So we give no signals or advice, we place no trades for you, and we never manage your funds.
On this page
- What Dhan automation actually means
- Ready-made Dhan automation: the two Indian copiers
- A token you generate yourself
- Built to your requirement
- Where the signals come from
- Your static IP and SEBI’s algo rules
- Dhan and F&O traders
- Product types and closing on time
- Limits, set once
- Where you stand
- Starting
- Frequently asked questions
What Dhan automation actually means
Dhan automation is software that places orders in your own account through the Dhan API, driven by whatever rules you set. The orders appear in your normal order book, and your credentials never leave your machine.

Ready-made Dhan automation: the two Indian copiers
Not every job needs custom code. Two of our ready-made apps already trade Dhan through DhanHQ v2, along with nine other Indian brokers. The Telegram to Indian broker copier turns the calls in your channels into orders. The TradingView to Indian broker copier does the same for your TradingView alerts.
For a Dhan account, both of them handle the awkward parts:
- The security id. Dhan names every contract by a number and the segment it lives in. So the app finds both in Dhan’s own scrip master, reading its columns by name.
- No naked market orders. Dhan’s API has no market-protection field. So the app’s protective-limit switch is what keeps a market signal from going out as a plain market order, and it is on by default.
- Large orders. First the app sends the whole order. Only if Dhan refuses it for the freeze limit does it resend through Dhan’s slicing endpoint, and never after a timeout.
- Real rejections. Dhan can answer with an order id even when it rejected the order. The app checks the status, so a rejected stop never counts as protection.
- Plain words. Dhan’s error codes, such as DH-904, appear with their meaning. For example, DH-904 means a rate limit that clears in a second.
- The right product. Intraday goes as INTRADAY. Delivery goes as CNC for shares and as MARGIN for options.
They trade options and NSE cash equity. Futures and MCX are outside them, so those need a custom build.

A token you generate yourself
Dhan’s sign-in is simpler than at most Indian brokers, and that gives Dhan automation fewer moving parts. You generate an access token in Dhan Web, under your profile, and paste it in with your client id. There is no redirect URI to match.
The token lasts 24 hours, though, so it is still a daily step. Dhan’s DhanHQ v2 documentation also describes a call that renews a token while it is still active. It also offers a TOTP sign-in for API-only logins, and a custom build can use either one.
A token is a credential, so the software treats it like one. The ready-made copiers keep it in a sealed file on your computer, show it back masked and never write it into the journal. You can also revoke and replace it from your own Dhan account at any time. When it runs out, the app says so in plain words, not as a bare code.

Built to your requirement
Custom Dhan automation is not a ready-made product with settings. Instead, you describe the behaviour, and that is what we build.
Requirements arrive as plain sentences, and that is enough. Trade only the first hour. Skip the next signal after a loss. Put two lots on BANKNIFTY, one on NIFTY and nothing on stocks. Stop for the day after three losses. Message me on Telegram whenever it does anything.
Send yours, and we will say whether Dhan’s API supports it before you commit.
Where the signals come from
Dhan automation takes its instruction from whichever source you use, and combining two or three is normal:
- Telegram – channels, groups or bots your own account reads.
- WhatsApp – groups and direct messages, forwards included.
- Discord – servers and channels, bot posts and embeds.
- TradingView – webhook alerts from your own strategy.
- Built-in logic – conditions the software checks itself, with no outside feed.
- Manual – your call, then its execution and management.
Each source keeps its own sizing and its own limits.
Your static IP and SEBI’s algo rules
SEBI’s framework for retail algo trading has applied since 1 April 2026. Under it, Dhan takes API orders only from a static IP that you have whitelisted. So a home connection whose address keeps changing will not do. A VPS with a fixed IP will, and so will a static IP from your internet provider.
Dhan’s documentation adds a few details. The IP matters for placing orders, not for reading them. You can set a main IP and a backup one, and each person needs a unique IP. Once you set one, you cannot change it for 7 days, so choose the machine first.
The Dashboard shows the address Dhan sees, with a Copy button. If that address changes, the app warns you, because Dhan refuses orders from an IP it does not know.

Dhan and F&O traders
Most Dhan automation requests come from options traders. And options are where Dhan automation earns its keep or quietly fails.
“NIFTY 24600 CE” is not an instrument until the software finds the strike, the expiry and the exact security id Dhan uses. Those change at every expiry. So anything with hard-coded ids runs until the next expiry and then stops without saying why.
That is why the copiers download Dhan’s scrip master and reload it every six hours. With no expiry named, they take the nearest one that has not passed. If Dhan ever changes the file’s format, the app stops and names the missing column rather than guess. A custom build matches futures the same way.
Product types and closing on time
Dhan has its own product names. INTRADAY is intraday, CNC is delivery for shares, and MARGIN carries an F&O position forward. Sending CNC on an option would fail, so the app picks the right one for each contract.
Give Dhan automation its own square-off time, and it squares off what is still open at that minute. That happens before the broker’s automatic square-off runs at its own time. If you carry positions overnight, simply leave the time blank.
Limits, set once
Both ready-made copiers carry these limits for each Dhan account:
- A daily cap on orders, 10 to start with, and a cap on lots per order.
- Ceilings on rupees per order and on open positions.
- A slippage guard that skips an entry when the price has run too far.
- Trading hours of 09:15 to 15:15 by default, plus a repeat window for calls posted twice.
- One kill switch that refuses every new order at once.
A custom build can also carry a daily loss cap, a daily profit target and allowed instruments and hours. Those extra limits stay off until you turn them on. Either way, every refusal goes into the log with its reason. Silence is never an acceptable answer from software that places your orders.

Where you stand
Running this on your own account, with your own credentials and rules, is you trading your own money with a tool you commissioned.
Operating it for other people falls under SEBI’s rules in India. We build software, nothing more. AlgoDevelop is not a SEBI-registered intermediary, adviser or research analyst, and it is not your broker or fund manager. We give no tips, we manage nobody’s money, and we promise no outcome. You make the decisions, and you handle any registration your use may need. Before you trade for anyone else, read whether copy trading is legal in India.
Starting
- Describe the requirement – a WhatsApp message will do.
- We scope the Dhan automation against their API and quote a fixed price with a timeline.
- You generate the access token in your own account and whitelist your static IP.
- Run a session with trading switched off, or in Paper mode with a ready-made copier, and read the log.
- Go live small, then scale on evidence.
We build the same for Zerodha, Angel One, Upstox and Fyers. One strategy can even drive them all at once through multi-broker copy trading. When you are ready, ask for a quote.
Dhan automation – frequently asked questions
Is there a ready-made Dhan bot?
There are two. The Telegram to Indian broker copier and the TradingView to Indian broker copier both trade Dhan through DhanHQ v2. For anything they do not cover, we write Dhan automation to your requirement.
How does Dhan’s sign-in differ from other brokers?
You generate an access token in Dhan Web and paste it in with your client id. There is no redirect URI to match, so less can break at 9:10 in the morning.
Do I have to log in every morning?
The token lasts 24 hours, so in the ready-made copiers you paste a fresh one each day. Dhan also documents a renew call and a TOTP sign-in, which a custom build can use.
Can it take signals from Telegram, WhatsApp or Discord?
The ready-made copiers take Telegram calls and TradingView alerts. A custom build can also read WhatsApp and Discord, run its own logic or take a manual trigger.
Where is my access token kept?
On your own machine, in a sealed file, and the app sends it only to Dhan. You can revoke and replace it from your own Dhan account at any time.
Why does Dhan need my static IP?
Since 1 April 2026, SEBI’s retail algo rules let Dhan accept API orders only from a whitelisted static IP. Once you set it, Dhan locks it for 7 days.
Can it trade options like BANKNIFTY 52000 CE?
It can, and most Dhan automation requests come from options traders. The software finds the strike, expiry and exact security id in Dhan’s own scrip master.
What happens when the token expires?
Dhan refuses it, and the app tells you in plain words to generate a new one. It never fails quietly in the middle of a session.
Can it run my own TradingView strategy?
Of course. Your strategy fires a webhook alert, and Dhan automation places the order, so you trade something you built rather than something you follow.
Do you provide signals or run it for me?
Neither. We build the software, and you run it on your own account with your own token.
Do I own what you build?
You do. Custom Dhan automation comes with its documentation. There is no per-trade fee, and nothing of ours it has to reach in order to run.
What about SEBI compliance?
Trading your own account with your own rules is you trading your own money. Operating it for other people falls under SEBI’s rules in India.