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
| Requirement | Where to get it |
|---|---|
| A Zerodha account with Console access | console.zerodha.com, using your Kite user ID, password and TOTP |
| A Zerodha account in TradeLyser | Added from Accounts → Add Account with Auto Sync or File Upload. See Connect Zerodha. |
| Your Console tradebook | Downloaded in Step 1, one file per segment |
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
- Log in to Zerodha Console and open Reports → Tradebook.
- Pick the Segment (for example Equity or F&O).
- Pick the date range and click the arrow button to load your trades.
- 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
- In TradeLyser, open Accounts.
- Open the ⋯ actions menu on your Zerodha account and choose Import Trade.
- Check that the wizard shows your Zerodha account and Zerodha as the broker.

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
- Drag the tradebook file into the upload box, or click it to choose the file.
- TradeLyser detects the Zerodha Console tradebook format and moves to Preview Data.
- Check that the rows, dates and symbols match what you saw in Console.
- Click Map Data.
Step 4: Review and import
- Review the Mapped Orders.
- 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.
- Click Import Trades. Processing runs in the background, and you see a message when the orders are imported.
- 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.
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 action | Use it for |
|---|---|
| Sync Trades | Today's Zerodha orders, after the market closes |
| Re-Auth | Logging in to Kite again when the daily session expires |
| Import Trade | Console tradebook files for past days |
| Import Template | Trades in the TradeLyser CSV template, for anything the tradebook doesn't cover |
Troubleshooting Zerodha history imports
| Problem | Fix |
|---|---|
| File format not recognized | You 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 appear | Each tradebook covers one segment. Download and import the other segments too. |
| Trades before a certain date are missing | Each download covers up to 365 days. Download and import the earlier years. |
| Duplicate trades | The 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 open | The 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 menu | Your plan's trade-import limit is used up. Each imported execution counts towards it. |
| Trades imported but not visible | Select 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.