Skip to main content

How to Import Your Zerodha Trade History into TradeLyser

The Kite Connect API gives TradeLyser your current day's Zerodha trades, so everything before that comes from the tradebook you download from Zerodha Console. TradeLyser has a dedicated parser for the Console tradebook format, so you upload the file as it is: no editing, no column mapping. Importing a year of trades takes about 10 minutes.

Once your history is imported you can:

  • See your real long-term win rate, expectancy and P&L by symbol, not just the days since you connected.
  • Review and tag past Zerodha trades in the Daily Journal and Trades Log.
  • Close out positions you opened before connecting, so they don't sit in Open Positions.

What you need​

RequirementWhere to get it
A Zerodha account with Console accessconsole.zerodha.com, using your Kite user ID, password and TOTP
A Zerodha account in TradeLyserAdded from Accounts → Add Account with Auto Sync or File Upload. See Connect Zerodha.
Your Console tradebookDownloaded in Step 1, one file per segment
Sync History doesn't work for Zerodha

Sync History in TradeLyser is available only for Dhan, ICICI and Upstox. On a Zerodha account it is greyed out. Zerodha history always comes from the Console tradebook, imported with Import Trade.

Step 1: Download the tradebook from Zerodha Console​

  1. Log in to Zerodha Console and open Reports → Tradebook.
  2. Pick the Segment (for example Equity or F&O).
  3. Pick the date range and click the arrow button to load your trades.
  4. Download the file. Console offers CSV and XLSX; either works in TradeLyser.

Zerodha lets you download the tradebook for up to 365 days at a time. For a longer history, download one file per year. Repeat for every segment you trade, because each download covers one segment.

Download the tradebook, not the P&L or tax P&L report. TradeLyser needs each individual buy and sell to rebuild your trades.

Step 2: Open Import Trade on your Zerodha account​

  1. In TradeLyser, open Accounts.
  2. Open the ⋯ actions menu on your Zerodha account and choose Import Trade.
  3. Check that the wizard shows your Zerodha account and Zerodha as the broker.

The actions menu on a Zerodha account in TradeLyser, with Sync Trades, Re-Auth and Import Trade

If you selected a single File Upload Zerodha account in the header account selector, you can also use the Import Trade button in the header.

Step 3: Upload and preview the tradebook​

  1. Drag the tradebook file into the upload box, or click it to choose the file.
  2. TradeLyser detects the Zerodha Console tradebook format and moves to Preview Data.
  3. Check that the rows, dates and symbols match what you saw in Console.
  4. Click Map Data.

Step 4: Review and import​

  1. Review the Mapped Orders.
  2. Leave Avoid fees (₹0), Avoid taxes (₹0) and Avoid slippages (₹0) unticked if you want TradeLyser to apply your account's fee and tax settings.
  3. Click Import Trades. Processing runs in the background, and you see a message when the orders are imported.
  4. Click the refresh icon in the header, then open the Trades Log to check the imported trades.

Repeat Steps 3 and 4 for each segment and each year of history.

These choices are permanent

Imported orders are matched into trades using the Zerodha account's calculation method. FIFO matches how Zerodha reports P&L. The calculation and import methods can't be changed after the account is created.

Avoid duplicates with Auto Sync​

If you sync this Zerodha account with Sync Trades, end the tradebook date range on the day before you connected Auto Sync. Days that are both synced and imported from a file can appear twice. After that, keep your journal current with Sync Trades after each trading day, and Re-Auth whenever the account shows Re-auth required.

Account actionUse it for
Sync TradesToday's Zerodha orders, after the market closes
Re-AuthLogging in to Kite again when the daily session expires
Import TradeConsole tradebook files for past days
Import TemplateTrades in the TradeLyser CSV template, for anything the tradebook doesn't cover

Troubleshooting Zerodha history imports​

ProblemFix
File format not recognizedYou probably uploaded a P&L, tax or holdings report. Download Reports → Tradebook from Console and upload it unedited.
Only equity (or only F&O) trades appearEach tradebook covers one segment. Download and import the other segments too.
Trades before a certain date are missingEach download covers up to 365 days. Download and import the earlier years.
Duplicate tradesThe tradebook overlapped days already synced. Delete the duplicates and re-import with a date range that ends before your first sync.
Old positions show as openThe opening trade is older than your earliest import. Import the earlier tradebook, or close the position manually from Open Positions.
(Trade limit reached) in the menuYour plan's trade-import limit is used up. Each imported execution counts towards it.
Trades imported but not visibleSelect the Zerodha account in the header account selector and click the header refresh icon.

More fixes: CSV import errors and Trades not syncing.

Frequently asked questions​

How do I export my Zerodha tradebook?​

Log in to Zerodha Console, open Reports → Tradebook, choose the segment and date range, and download the file as CSV or XLSX.

Can TradeLyser sync old Zerodha trades automatically?​

No. The Kite API gives TradeLyser the current day's trades, and Sync History isn't available for Zerodha. Import past trades from the Console tradebook.

How far back can I import Zerodha trades?​

As far back as Console lets you download your tradebook. Each download covers up to 365 days, so import one file per year.

Should I upload the Zerodha P&L report?​

No. Upload the tradebook. The P&L report summarises trades and doesn't contain every buy and sell.

Next steps​