ArthaLearn — India's Financial Intelligence HubArthaLearn
FeaturesStocksLearnFree ToolsCompareGuidesBlog
Get Started

Stocks

  • All Stocks
  • Banking & Finance
  • IT Sector
  • Pharma
  • Auto
  • Energy

Learn

  • All Topics
  • Glossary
  • Candlestick Patterns
  • Support & Resistance
  • Options Basics

Free Tools

  • All Resources
  • Position Size Calculator
  • P&L Calculator
  • Brokerage Comparison
  • Inflation Calculator
  • F&O Margin Calculator
  • SIP Calculator
  • Credit Card Calculator

Compare

  • Best Trading Journals
  • vs Zerodha Streak
  • vs TradingView
  • vs StockEdge

Cities

  • All Cities
  • Mumbai
  • Delhi
  • Bangalore
  • Chennai
  • Hyderabad
  • Pune

Guides

  • All Guides
  • Start Trading in India
  • Why Traders Lose Money
  • AI Trading Journal
  • Fingrad vs Varsity

Company

  • Blog
  • Events
  • Pricing
  • Support
  • Privacy Policy
  • Terms of Service

© 2026 ArthaLearn. All rights reserved.

Not SEBI registered. For educational purposes only. Not investment advice.

  1. Home
  2. /
  3. Guides
  4. /
  5. Import Dhan Trades

Import Dhan Trades to ArthaLearn — Auto-Sync Guide

Dhan is a fast-growing Indian broker known for its speed and modern interface. ArthaLearn offers a direct integration with Dhan via the DhanHQ Partner API, enabling automatic daily trade sync. You can also import trades manually using CSV. This guide covers both methods.

1. Connect Dhan via Auto-Sync (DhanHQ Partner API)

The fastest way to get your Dhan trades into ArthaLearn is through the auto-sync integration. Here is how to set it up:

  1. Sign up for ArthaLearn or log in to your existing account.
  2. Go to Settings > Broker Connections.
  3. Click Connect next to Dhan.
  4. You will be redirected to Dhan's authorization page. Log in with your Dhan credentials and approve the connection.
  5. After authorization, you are redirected back to ArthaLearn. The connection status will show as active.

ArthaLearn uses a JWT token with 24-hour expiry for the connection. One session per trading day is maintained. Your Dhan password is never stored on ArthaLearn servers.

2. Understanding the OAuth Flow

When you connect your Dhan account, the following happens behind the scenes:

  • ArthaLearn redirects you to Dhan's secure authorization endpoint.
  • You log in to Dhan and grant ArthaLearn read-only access to your trade data.
  • Dhan sends a callback to arthalearn.com/dhan/callback with an authorization token.
  • ArthaLearn exchanges this for a secure JWT and stores it encrypted.
  • Trades are fetched daily using this token. When the token expires, you simply re-authorize with one click.

3. Daily Sync — How It Works

Once connected, ArthaLearn fetches your executed trades from Dhan automatically each trading day.

  • Trades are synced after market hours, capturing all intraday and delivery executions.
  • Each trade includes symbol, segment, quantity, price, timestamps, and order details.
  • Duplicate detection ensures re-synced trades are not imported twice.
  • You can view sync status and history in Settings > Broker Connections.

4. CSV Import as an Alternative

If you prefer manual imports or need to import historical data, you can use CSV upload:

  1. Log in to your Dhan account and go to the Backoffice section.
  2. Navigate to Trade History or Reports.
  3. Select your date range and download the trade report as CSV.
  4. In ArthaLearn, go to Import, select Dhan as your broker, and upload the CSV.
  5. Review the preview and confirm the import.

5. Troubleshooting Dhan Import Issues

Auto-sync shows disconnected

The Dhan JWT token expires every 24 hours. If your connection shows as disconnected, click Re-authorize in Settings > Broker Connections to generate a fresh token.

Trades not appearing after sync

Ensure you have executed trades for the day. Pending or cancelled orders are not imported. Only fully executed trades appear in ArthaLearn.

CSV format not recognized

Make sure you download the file from Dhan's backoffice, not from a third-party tool. The CSV should contain trade date, symbol, side, quantity, and price columns.

6. Frequently Asked Questions

How does the Dhan auto-sync work with ArthaLearn?

ArthaLearn uses the DhanHQ Partner API to fetch your executed trades automatically. After you authorize via OAuth, trades are synced daily. Your credentials are never stored — only a secure JWT token with 24-hour expiry.

Can I import historical trades from Dhan?

Yes. While auto-sync fetches daily trades going forward, you can import historical trades by downloading a CSV from Dhan's backoffice and uploading it to ArthaLearn.

Is the Dhan integration free to use?

The Dhan auto-sync is available on all paid ArthaLearn plans. Free trial users can import trades via CSV upload during their trial period.

What happens if the Dhan sync fails?

If a sync fails due to token expiry, ArthaLearn notifies you and provides a one-click re-authorization option. You can also import via CSV as a fallback.

Connect Your Dhan Account Today

Set up auto-sync in under a minute and never miss logging a trade again.

Start Free TrialView Pricing

Related Resources

  • ArthaLearn Features Overview
  • Learn Trading Concepts
  • Import Trades from Zerodha
  • Import Trades from Upstox