FREE Account Opening + No Clearing Fees
Loading...

Dhan API (Algo Trading) Review


302.68% 434,798 Clients

Dhan Account Opening Enquiry

Invest brokerage-free stock delivery trades. Pay a flat Rs 20 per trade for Intra-day and F&O. Open an instant account with Dhan and start trading today.

Dhan offers two types of APIs to its customers through DhanHQ: Trading API and Data API. DhanHQ API is super fast and allows you to connect the platform of your choice to Dhan trading account.

Dhan provides resource-based URLs that accept JSON or form-encoded requests. Dhan uses standard HTTP response codes.

Dhan API charges are Zero. Dhan Trading APIs are free for all Dhan users. To unlock the data APIs, users must execute 25 F&O trades in a month or pay Rs 499 per month to use them.

Dhan API is a set of REST-like APIs that provide integration with trading platforms. Dhan API provides programmatic access to all data and functions that allow users to place and manage orders, access live market data and historical data, view positions and holdings, enquire about order margin and account balance, and more.

Data APIs are offered for all segments including Equity, Futures and Options, and Commodities.

Dhan API key features:
  • Trading API is free. Data API is Rs 499 per month.
  • Integration time: 15 minutes.
  • Place 25 orders per second and 250 orders per minute.
  • 5000 order requests per day.
  • Execute, and modify orders in real-time.
  • Manage Portfolio.
  • Access live market data of all exchanges.
  • Lightning-fast API collection.
  • Retrieve P&L statements, transaction costs, taxes, ledger summary, contract note, etc.
  • Partners: TradingView,Algomojo, GoCharting, SquareOff, and more.
  • You can add money to your trading account via Dhan's secure and frictionless API.

Dhan API Cost


Dhan API Cost is Rs 0. Dhan offers two types of APIs: Trading APIs and Data APIs.

Dhan Trading APIs are completely free, while Data APIs are free only if you complete 25 trades in the previous 30 days, otherwise, the fees are Rs. 499 plus taxes.

There are no other extra charges for Dhan APIs.

Dhan API Pricing

API Type Pricing
Trading APIs Free
Data APIs Rs 0 (on completion of 25 trades in the previous 30 days) otherwise Rs 499.

Dhan API Features

Feature Description

Broking APIs offered

Data and Trading API/DhanHQ API and

Language Used

Any Programming Language

Exchanges supported

BSE NSE and MCX

Real-Time data

Yes

Rate Limits

Refer DhanHQ API Limit below

Supported features in trading app

Login Authentication

Order execution, modification and cancellation

Access to Historical data

Portfolio

Live Market Data

Integration with third-party software

30 trading platforms - 1Cliq (by OI Pulse), Algoji, Tradetron, Stratzy, Anastrat, NeoTrader, Quicko, Ninjatrader

Pricing

Trading APIs are Free to use
Data APIs are Rs 0 (on completion of 25 trades in the previous 30 days) otherwise Rs. 499 plus taxes.

Order Types Available

Limit Order

Market Order

Stop Loss Order

Bracket Order

Cover Order

Product Types available

Equity

Futures

Options

Commodity

Currency

Dhan API Limit


  • Order placement API rate limit: 25 requests per second, 250 requests per minute, 500 requests per hour and 5000 requests per day
  • Order modification API rate limit: 25 modifications/order
Order placement API rate limit Order APIs Data APIs Non Trading APIs

Per second

25

10

100

Per minute

250

1000

500

Per hour

500

5000

1000

Per day

5000

10000

5000

Dhan API login


Dhan customers with trading and demat accounts can access the Dhan API. If you do not have an account with Dhan yet, open an instant account with Dhan to access the DhanHQ APIs

DhanHQ is designed for Traders, Algo Platforms, Fintechs, Banks, Portfolio Managers and Stock Brokers. DhanHQ enables its customers to connect with Dhan's platform for the execution of trades via APIs.

Dhan API Bridge is lightning-fast and connects your preferred platform to your Dhan trading account.

The steps to log in to Dhan API for Individual Traders are as follows:

  • Login to web.dhan.co
  • Click on profile.
  • Click on Dhan HQ API's Access.
  • Generate the Access Token.
  • Login completed

Note: The token is valid for a maximum of 30 days.

The steps to log in to Dhan API for Partners are as follows:

The partner is signed up through an offline channel.

Step 1.

Partner needs to add partner_id & partner_secret code.

Partner gets consent ID (you use this consent ID for the next browser-based flow/step).

Dhan API Demo 1

Step 2

  • The Token ID is generated. Partner to start the browser-based login process for Dhan customers.
  • Use this token-id the next GET call. URL ?tokenid=.
Dhan API Demo 2

Step 3

  • Partners need to add the partner_id & partner_secret ID again.
  • End user details like ClientId, UCC, PoA status etc will be visible.
Dhan API Demo 3

Types of Dhan API


1. Trading API

A Trading API allows traders to write their own computer programs. With the help of the trading API, traders can create their own customized programs using third-party platforms.

With the trading API, traders can execute orders in real-time, manage their portfolio, stream live market data, and more.

2. Data API

The Data API is a REST interface that allows you to access and manage data.

3. Historical Data API

The Historical Data API allows traders to retrieve historical OHLC (Open High Low Close) historical data and volume from a daily candle for securities. The data is presented in the form of a candle and is available in intervals of the 1-minute candle for the current day. The historical API is available for all segments including futures and options.

The following data can be checked by traders using historical data API:

  • Historical candle data for the scrip across segments & exchange.
  • Timestamp,
  • Open, high, low, close & volume.

4. Portfolio API

The Portfolio API allows traders to recover holdings and positions in their portfolios. Users can restore a list of holdings in a demat account, recover open positions, and convert intraday positions to delivery or delivery to intraday.

5. Order Management API

The order management API allows traders to place a new order, cancel or modify a pending order, and retrieve order status, trade status, order book, and trade book.

The following data can be checked by traders using historical data APIs:

  • Place, modify and cancel orders.
  • Slice order into multiple legs over freeze limit
  • Recover Retrieve the list of all orders for the day
  • Retrieve the status of an order
  • Recover the status of an order by correlation id
  • Recover the list of all trades for the day
  • Recover the details of a trade by an order id

6. Funds API

Fund API allows traders to Get all information about your trading account like balance, margin utilized, collateral, etc.

The following data can be checked by traders using historical data API:

  • User-specific identification generated by Dhan
  • Available amount to trade
  • Start of the day amount
  • Amount received against collateral
  • Amount available against sell trades (delivery)
  • Amount utilized in the day
  • Amount blocked against withdrawal request
  • Amount available for withdrawal from the bank account

7. Statement API

The Statement API allows traders to retrieve debit and credit details of trading accounts, as well as all historical trade details for a specified time interval.

The following data can be checked by traders using the historical data API:

  • Number of shares executed and the price at which the trade was executed
  • The time when the order was created
  • The time when the last activity took place
  • The time when the order was received on the exchange

Dhan API Example


Dhan API makes trading easy and convenient for traders. Let us see a simple example of how to use Order Management API.

  • Order Management API (trading API) allows clients to build and create their own algos based on formulated trading strategies. The algos can automatically place orders for you when the required conditions are met. You no longer need to manually place, modify and execute orders manually.

Dhan Support


The contact number of Dhan Trading is 022-48906273. Customers can reach the Dhan Helpline number from 9:00 am to 6:00 pm on trading days.

Customers can send an email to help@dhan.co to ask their queries. This service is available to users 24x7.

Dhan Special Offer

Brokerage-free share delivery trading and AMC free demat account

  • Free account opening and Demat AMC +
  • Brokerage-free equity delivery and flat Rs 20 per trade for intraday and F&O +
  • Separate option trading APP.

This is a limited-time offer. Open an instant account online and start trading today.

Frequently Asked Questions

  1. 1. What is Dhan?

    Founded in 2021, Dhan is an online broking company offering financial services. Dhan offers online stock trading and investing services in India. Dhan has developed technologically advanced trading platforms.

    Dhan allows its customers to open a 2-in-1 account. The account opening and account maintenance charges are Zero.

    The company has a simple pricing model. Dhan charges Rs 20 per trade for intraday trading in Equity, ETF, Currency, F&O and Commodity segments. Dhan is offering a 50% discount to its female customers and charges a brokerage of Rs 10 per trade for intraday trades.

     

  2. 2. How to generate API token?

    Dhan customers can generate API token using web.dhan.co. To create an API token, simply follow the instructions below:

    1. Login to web.dhan.co.
    2. Go to your profile.
    3. Click on "Dhan HQ APIs & Access."
    4. On the following page, you will have the option to create an access token.

     

  3. 3. Are Dhan APIs free?

    Yes, Dhan APIs are free of charge. Dhan offers two APIs: Trading API and Data API. Trading APIs are absolutely free of cost. The data APIs are free if customers have executed 25 trades in the last 30 days. If they do not, they can get the data API access by paying Rs 499 + taxes.

     

  4. 4. What kind of APIs does Dhan provide?

    Dhan offers trading API and data API to its clients.

    Trading API - Trading APIs provide access to order placement, position, portfolio, funds, special orders and much more.

    Data API - Data APIs allow access to historical data, data for any scrip or live market feeds.

     

Dhan Account Opening Enquiry

Invest brokerage-free stock delivery trades. Pay a flat Rs 20 per trade for Intra-day and F&O. Open an instant account with Dhan and start trading today.

Dhan Competitors Review

Information on this page was last updated on Saturday, June 3, 2023

Special Offer: Invest brokerage-free stock delivery trades. Pay a flat Rs 20 per trade for Intra-day and F&O. Open an instant account with Dhan and start trading today.

Comments

Add a public comment...