Skip to main content

How to Import Dhan Trades into TradeLyser from a File

If you'd rather not connect the Dhan API, you can still journal every Dhan trade by importing a file. TradeLyser has a dedicated Dhan parser that recognises Dhan's trade file format, converts Dhan option names such as NIFTY 07 AUG 24600 CALL into a standard symbol, and skips orders that weren't executed. An import takes a few minutes.

Once imported you can:

  • Review every Dhan trade in the trades log with P&L, fees and tax.
  • Add notes, tags and ratings, and journal each trading day.
  • Backfill months of Dhan history in one go, then keep it current with Auto Sync if you like.
Want trades to arrive without files?

Connect Dhan with Auto Sync instead. It needs only your Dhan Client ID and a Dhan login, and adds Sync History and Live Insights.

What you need​

RequirementWhere to get it
A Dhan trade file (CSV, XLS or XLSX) for the dates you wantDhan's reports or statements section (Step 1 below)
A TradeLyser account with a Dhan account addedapp.tradelyser.com, Accounts → Add Account
Keep the file as Dhan exported it

The Dhan parser looks for Dhan's own column names: Date, Time, Buy/Sell, Name, Quantity/Lot, Trade Price and Status. Renaming columns, deleting the header row or re-saving the dates in a different format in Excel is the most common reason a Dhan file isn't recognised.

Step 1: Download your trades from Dhan​

  1. Log in to web.dhan.co.
  2. Find your executed trades. Dhan's help centre lists them under the Profile icon → Journal by Dhan → Past Trades, where you can set a From – To date range. In the Dhan app they are under Profile → All Statements → All Exchange Transactions (Past Trades).
  3. Download the trade file for the date range from Dhan's reports or statements section. If you can't find a download option, Dhan's support team (help@dhan.co) can send you your trade history.
  4. Save the file without editing it.

Dhan changes its menus from time to time. If the names above don't match what you see, look for your trade history or past trades in Dhan's statements area.

Step 2: Add a Dhan account for file imports​

Skip this step if you already have a Dhan account in TradeLyser.

  1. In TradeLyser, open Accounts and click Add Account.
  2. Choose Dhan and a calculation method. FIFO is recommended and matches how most Indian brokers report P&L.
  3. Choose File Upload as the import method, enter an account name and save.
These choices are permanent

The calculation method and import method cannot be changed after the account is created. If you need a different method later, add a second Dhan account.

Step 3: Import the Dhan file​

  1. Choose Import Trade in the TradeLyser header, or from the ⋯ actions menu on your Dhan account.
  2. Select File: drag in the Dhan CSV or Excel file. TradeLyser detects the Dhan format and shows it on screen.
  3. Preview Data: check that the rows look right, then click Map Data.
  4. Map & Import: review the mapped orders, optionally choose to ignore fees, taxes or slippage, and click Import Trades.

Each execution counts towards your plan's monthly trade-import limit, and you'll see a warning when you are close to it.

What the Dhan parser reads​

Dhan columnHow TradeLyser uses it
Date and TimeCombined into the order timestamp (IST). Dates in DD/MM/YYYY or YYYY-MM-DD are accepted.
Buy/SellB/Buy become BUY, S/Sell become SELL.
NameThe symbol. Options like NIFTY 07 AUG 24600 CALL are converted to compact symbols such as NIFTY25080724600CE (underlying, YYMMDD expiry, strike, CE/PE), using the year of the trade date.
Quantity/LotQuantity, either as a number (75) or quantity/lot (75/1).
Trade PriceExecution price. Rows with a zero price are skipped.
StatusOnly rows marked Traded or Success are imported. Rejected or cancelled orders are skipped.
Order, Exchange, Segment, Trade ValueStored as order type, product, exchange and segment details where present.

Troubleshooting Dhan file imports​

ProblemFix
The Dhan format isn't detectedUse the original file from Dhan with its header row intact. If it still isn't recognised, copy the rows into the TradeLyser CSV template and use Import Template.
Some rows are missing after importOnly executed rows (Traded or Success) are imported. Rows with zero quantity or price are skipped.
Option expiry has the wrong yearThe year comes from the Date column. Check the file has a Date column and that Excel hasn't changed its format.
Trades appear twiceYou imported overlapping date ranges, or imported days that Auto Sync already fetched. Delete the duplicates and import non-overlapping ranges.
Import is blockedYou have reached your plan's monthly trade-import limit.

For more fixes, see CSV import errors.

Frequently asked questions​

Can I import Dhan trades into a trading journal?​

Yes. TradeLyser imports Dhan trade files with a dedicated Dhan parser, or connects to Dhan directly with Auto Sync.

How do I export my Dhan tradebook?​

Dhan lists executed trades under Journal by Dhan → Past Trades on web.dhan.co, with a date range filter. Download the trade file for that range from Dhan's statements section, or ask Dhan support for your trade history.

Should I use a file import or Auto Sync for Dhan?​

Use Auto Sync for daily trading: it fetches trades with one click and supports Live Insights. Use a file import for a one-off backfill, or if you don't want to connect your Dhan login.

Can I import an Excel file from Dhan?​

Yes. The import wizard accepts CSV, XLS and XLSX files.

Next steps​