How to Connect Zerodha to TradeLyser
Connecting Zerodha to TradeLyser turns your Kite trades into a trading journal automatically, so you don't have to download a tradebook and fill in a spreadsheet every evening. TradeLyser connects through Zerodha's official Kite Connect API: you create a Kite Connect app once, paste its API key and secret into TradeLyser, and log in with your usual Kite credentials. Setup takes about 10 minutes.
Once connected you can:
- Sync Zerodha trades automatically every weekday night, or with one click whenever you want them sooner.
- Import your past trades from the Zerodha Console tradebook, so your analytics cover your full history.
- Track P&L, win rate, fees and tax for every Zerodha trade on the TradeLyser dashboard.
What you need
| Requirement | Where to get it |
|---|---|
| An active Zerodha account with Kite login (user ID, password and TOTP) | kite.zerodha.com |
| A Kite Connect app (API key and API secret) | Kite Connect developer console, created in Step 1 below |
| A TradeLyser account | app.tradelyser.com (a free trial is available) |
Kite sends you back to TradeLyser only if the Redirect URL in your Kite Connect app matches TradeLyser's callback URL character for character:
https://app.tradelyser.com/zerodha-callback
A missing https://, an extra / at the end or a typo is the most common reason a Zerodha connection fails.
Step 1: Create a Kite Connect app
- Open the Kite Connect developer console and log in with your Zerodha user ID, password and the TOTP from your authenticator app.
- Click Create new app.
- Choose the Personal app type. Zerodha offers Kite Connect Personal free for personal use.
- Fill in the details:
- App name:
TradeLyser(or any name you will recognise) - Zerodha Client ID: your Zerodha user ID
- Redirect URL:
https://app.tradelyser.com/zerodha-callback
- App name:
- Save the app and copy the API Key and API Secret it shows. Treat the secret like a password.
You only need the API key and secret the first time you connect. After that, you just log in to Kite when your session expires.
Step 2: Add your Zerodha account in TradeLyser

- In TradeLyser, open Accounts and click Add Account.
- Choose Zerodha. Brokers with a green dot are supported for Auto Sync.
- Choose a calculation method. This decides how buys and sells are matched into trades:
- FIFO (first in, first out) is recommended. It matches how Zerodha and most Indian brokers report P&L.
- LIFO matches the most recent buy first.
- WA uses the weighted average price.
- Choose Auto Sync as the import method.
- Enter an account name (for example
Zerodha – Intraday), then paste the API Key and API Secret from Step 1. - Click Connect and Save Account. The Kite login window opens. Sign in with your user ID, password and TOTP, and you are returned to TradeLyser with the account connected.
The calculation method and import method cannot be changed after the account is created. If you need a different method later, add a second Zerodha account in TradeLyser.
Step 3: Sync your Zerodha trades

Open the ⋯ actions menu on your Zerodha account card:
| Action | What it does |
|---|---|
| Sync Trades | Fetches today's orders from Zerodha. You can choose to skip fees, taxes or slippage, then click Fetch Orders. Large syncs run in the background and you get a notification when they finish. |
| Re-Auth | Logs in to Kite again when the session has expired. |
| Import Trade | Imports a Zerodha Console tradebook file, which is how you bring in past trades (see below). |
TradeLyser also syncs your Zerodha account automatically every Monday to Friday at 10:30 pm IST, as long as your Zerodha login is still valid at that time. Run Sync Trades whenever you want today's trades in TradeLyser sooner, for example right after the market closes.
After a sync, click the refresh icon in the TradeLyser header so every dashboard widget picks up the new trades straight away.
Import your Zerodha trade history from Console
The Kite API gives TradeLyser the current day's trades, so past trades come from the tradebook you download from Zerodha Console. TradeLyser has a dedicated parser for the Zerodha Console tradebook format.
- Log in to Zerodha Console and open Reports → Tradebook.
- Pick the segment (for example Equity or F&O) and the date range, then download the file.
- In TradeLyser, open the ⋯ actions menu on your Zerodha account and choose Import Trade.
- Drag in the tradebook file. TradeLyser detects the Zerodha format and shows a preview.
- Check the rows, click Map Data, review the mapped orders and click Import Trades.
Repeat for each segment you trade. To avoid importing the same trades twice, end the tradebook date range on the day before you connected Auto Sync. For more detail, see Import Zerodha trade history.
Re-authenticate every trading day
Zerodha expires Kite Connect sessions every day. When that happens, the account card shows Re-auth required. Log in again before 10:30 pm so the nightly sync can run, and before any manual sync:
- Open the ⋯ actions menu on the Zerodha account.
- Choose Re-Auth and log in to Kite with your user ID, password and TOTP.
The account card's Token field shows how long the current session remains valid.
If your Zerodha login has expired, TradeLyser reminds you with a bell notification and an email in the morning (around 8:30 am) and a last call around 9 pm, so you can log in before the 10:30 pm sync. Accounts that are still logged out at 10:30 pm are skipped that night. To stop these reminders for an account, choose Turn off login reminders in its ⋯ actions menu.
Troubleshooting Zerodha connection issues
| Problem | Fix |
|---|---|
| Kite shows an error after login, or you are not returned to TradeLyser | The Redirect URL in your Kite Connect app doesn't exactly match https://app.tradelyser.com/zerodha-callback. Edit the app at developers.kite.trade, correct it, and connect again. |
| "Invalid API key" or "Invalid checksum" | Copy the API Key and API Secret again from the Kite Connect developer console. Check there are no spaces before or after them. |
| Account shows Re-auth required | The daily Kite session has expired. Use Re-Auth from the ⋯ menu. |
| TOTP is rejected | Make sure your phone's clock is set automatically. TOTP codes depend on the correct time. |
| Today's trades are missing | Run Sync Trades after the order is executed (or wait for the 10:30 pm nightly sync), then click the header refresh icon. |
| Older trades are missing | Import them from the Console tradebook with Import Trade. |
| Duplicate trades after importing history | The tradebook date range overlapped the days already synced. Delete the duplicates and re-import with a date range that ends before your first sync. |
Still stuck? Follow Troubleshoot broker connection or Trades not syncing, or email support@tradelyser.com.
Frequently asked questions
Does TradeLyser work with Zerodha?
Yes. Zerodha is supported for Auto Sync through the official Kite Connect API, and for importing Zerodha Console tradebook files.
Is the Kite Connect API free?
The Personal app type of Kite Connect is free for personal use, and it covers what TradeLyser needs to read your orders and trades. Check Zerodha's Kite Connect page for current terms.
Can I import old Zerodha trades?
Yes. Download the tradebook from Zerodha Console (Reports → Tradebook) and import it with Import Trade on your Zerodha account.
Do I need to log in to Kite every day?
Yes. Kite Connect sessions expire daily, so use Re-Auth to log in again before 10:30 pm so the nightly sync can update your trades, and before any manual sync.
Can I connect more than one Zerodha account?
Yes. Add each Zerodha account separately from Accounts → Add Account. The number of accounts you can add depends on your TradeLyser plan. See Add multiple accounts.
Next steps
- Sync broker trades
- View your trades log
- Create your first journal entry
- Connect Upstox if you also trade with Upstox