Skip to main content

Broker integration · DhanHQ API

Algo trading with Dhan, without writing code

Last updated:

Dhan is the most API-friendly of India’s newer brokers — DhanHQ offers free API access for traders, a modern developer experience and quick onboarding. Paired with INDfolio AI, it becomes a complete no-code automation setup: strategies built with AI, validated on NSE data, and executed on your Dhan account.

Official API
DhanHQ
Segments
NSE equity, F&O
Connection
API credentials — password never shared
API access
Free per Dhan’s current policy

How to connect Dhan in three steps

  1. 1

    Enable the DhanHQ API on your Dhan account

    Generate API credentials from Dhan's developer/API console. You keep full control — credentials can be revoked from your broker at any time.

  2. 2

    Connect the broker in INDfolio AI

    Paste your API credentials into INDfolio AI's broker settings. Credentials are stored encrypted (256-bit, in transit and at rest); your broker password is never asked for or stored.

  3. 3

    Deploy a validated strategy

    Pick a strategy that has passed backtesting and paper trading, set position limits and a daily loss cap, and switch it live. Orders flow through the official API; funds stay in your own broker account.

Why algo traders pick Dhan

Two reasons come up consistently: DhanHQ API access is free (most brokers charge for order-placement APIs), and the API itself is modern and well documented. For traders choosing a broker specifically to automate, that combination makes Dhan one of the lowest-friction starting points in India.

INDfolio AI connects through DhanHQ for order placement, position syncing and monitoring. Strategy logic, risk rules and scheduling all run on INDfolio AI’s cloud; Dhan executes and custodies.

What you can automate on Dhan

Equity, futures and options strategies across intraday, swing and positional styles — with NIFTY/BANKNIFTY options systems, TradingView alert automation and Chartink scanner automation all routing to the same Dhan connection. Every path enforces your position limits, daily loss cap and square-off rules.

FAQ

Frequently asked questions

Is algo trading allowed on Dhan?

Yes — Dhan provides the official DhanHQ trading API, and INDfolio AI connects through it in line with SEBI’s retail algo framework.

Is the Dhan API really free?

Dhan has offered DhanHQ API access free for traders — verify the current policy on Dhan’s site. Brokerage on executed trades applies as normal.

Do I need coding for Dhan algo trading?

Not with INDfolio AI. The platform handles the DhanHQ integration; you build strategies in plain English or visual blocks.

Is my Dhan account safe with INDfolio AI?

INDfolio AI stores only encrypted API credentials, never your password. Access is revocable from Dhan at any time, and your funds remain in your own Dhan account.

Describe your strategy. Backtest it in minutes.

Start on the free plan — AI strategy builder and NSE backtesting included, no card required.

Free · No card

Create your account

By continuing you agree to our Terms and Privacy Policy.