How to Connect 5paisa to TradeLyser
Connect your 5paisa account to TradeLyser and your trades land in your trading journal without downloading files or typing them into a spreadsheet. TradeLyser connects through 5paisa's official partner login, so you don't have to create a 5paisa developer app or copy API keys: you enter your 5paisa client code, sign in to 5paisa in a pop-up, and you are connected. Setup takes about 5 minutes.
Once connected you can:
- Sync 5paisa trades automatically every weekday night, or with one click whenever you want them sooner.
- Import older 5paisa trades from a 5paisa trade file, which TradeLyser reads with a dedicated 5paisa parser.
- See P&L, win rate, fees and tax for every 5paisa trade on the TradeLyser dashboard.
What you need
| Requirement | Where to get it |
|---|---|
| An active 5paisa trading account | 5paisa.com |
| Your 5paisa client code (Client ID) | Your 5paisa profile, or any 5paisa contract note or bill |
| Your usual 5paisa login details | The same ones you use in the 5paisa app or website |
| A TradeLyser account | app.tradelyser.com (a free trial is available) |
The 5paisa login opens in a pop-up window. If your browser blocks it, TradeLyser shows Authentication popup blocked. Allow pop-ups for app.tradelyser.com and click Connect and Save Account again. This is the most common reason a 5paisa connection doesn't start.
Step 1: Find your 5paisa client code
- Log in to your 5paisa account on the website.
- Open your profile from the top-right corner.
- Copy your client code. It is the same code 5paisa prints on your contract notes and bills.
Your client code is not your demat account number, so copy the code shown in your profile rather than the demat number.
Step 2: Add your 5paisa account in TradeLyser

- In TradeLyser, open Accounts and click Add Account.
- Choose 5paisa. 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 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
5paisa – F&O) and paste your 5paisa Client ID (client code) from Step 1. - Click Connect and Save Account. A 5paisa login window opens. Sign in and approve access, and you are returned to TradeLyser with a 5paisa Connected Successfully message.
The calculation method and import method cannot be changed after the account is created. If you need a different method later, add a second 5paisa account in TradeLyser.
Step 3: Sync your 5paisa trades

Open the ⋯ actions menu on your 5paisa account card:
| Action | What it does |
|---|---|
| Sync Trades | Fetches today's orders from 5paisa. 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 | Opens the 5paisa login again when the session has expired. |
| Import Trade | Imports a 5paisa trade file, which is how you bring in past trades. |
| Import Template | Imports trades from the TradeLyser CSV template. |
Run Sync Trades after your last order of the day is executed. Sync History is not available for 5paisa, so older trades come from a file (see below).
After a sync, click the refresh icon in the TradeLyser header so every dashboard widget picks up the new trades straight away.
Re-authenticate every trading day
5paisa access tokens are valid for one day and expire at 11:59 PM, so the account card shows Re-auth required the next morning. Log in again before 10:30 pm so the nightly sync can run, and before any manual sync:
- Open the ⋯ actions menu on the 5paisa account.
- Choose Re-Auth and sign in to 5paisa in the pop-up.
The account card's Token field shows how long the current session remains valid.
If your 5paisa 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.
Import 5paisa trades from a file
Auto Sync fetches the current day's orders, so past trades, or a whole account if you prefer not to connect, come from a file. TradeLyser has a dedicated 5paisa parser that reads 5paisa's order and trade export, with columns such as Time, Name, Exchange, Product Type, B/S, Executed Qty, Price and Status. Only fully executed orders are imported, and option names are split into underlying, expiry and strike automatically.
- Log in to 5paisa and open your reports (5paisa's reports portal is myreports.5paisa.com). Download your trade or order history for the date range you need, in Excel or CSV format.
- In TradeLyser, open the ⋯ actions menu on your 5paisa account and choose Import Trade. For a file-only account, add 5paisa with File Upload as the import method first.
- Select File: drag in the file. TradeLyser shows the detected format.
- Preview Data: check the rows, then click Map Data.
- Map & Import: review the mapped orders and click Import Trades.
If your file is not recognised, copy the trades into the TradeLyser CSV template and import that with Import Template. See Import trades from CSV for the full walkthrough. To avoid duplicates, end the file's date range on the day before you started using Sync Trades.
Troubleshooting 5paisa connection issues
| Problem | Fix |
|---|---|
| Authentication popup blocked | Allow pop-ups for app.tradelyser.com in your browser, then click Connect and Save Account again. |
| Please enter the Client ID before connecting | The Client ID field is empty. Paste your 5paisa client code and try again. |
| The 5paisa login closes without connecting | Check that the client code matches the 5paisa account you signed in with, then connect again. Don't start the login in two tabs at once. |
| Account shows Re-auth required | The daily 5paisa session has expired. Use Re-Auth from the ⋯ menu. |
| 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 a 5paisa trade file with Import Trade. Sync History is not available for 5paisa. |
| Wrong P&L matching (FIFO vs LIFO) | The calculation method can't be changed. Add a new 5paisa account with the method you want. |
Still stuck? Follow Troubleshoot broker connection or Trades not syncing, or email support@tradelyser.com.
Frequently asked questions
Does TradeLyser support 5paisa?
Yes. 5paisa is supported for Auto Sync through 5paisa's partner login, and for importing 5paisa trade files with a dedicated 5paisa parser.
Do I need a 5paisa API key to connect?
No. TradeLyser uses its own 5paisa partner credentials. You only enter your client code and sign in to 5paisa.
How do I import old 5paisa trades?
Download your trade or order history from 5paisa's reports section and upload it with Import Trade on your 5paisa account.
Do I need to log in to 5paisa every day?
Yes. 5paisa sessions expire at the end of each day, 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 5paisa account?
Yes. Add each 5paisa 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 Groww if you also trade with Groww