CSV Import Errors: Fix Trade File Imports in TradeLyser
When a trade file won't import, or imports with the wrong numbers, the cause is almost always the file itself: the wrong report type, renamed columns, reformatted dates or an overlapping date range. Find what you see in the table below and apply the fix. Most files import cleanly on the second try.
TradeLyser has two file imports, both in the account's ⋯ actions menu on the Accounts page:
- Import Trade reads your broker's own trade file (CSV, XLS or XLSX). Dedicated formats exist for Zerodha (Console Tradebook), Fyers, Dhan, 5paisa, NeoStox and RMoney (Portfolio Statement); other brokers' files use a generic parser.
- Import Template reads the TradeLyser CSV template, which works for any broker.
Symptom table
| Message or symptom | Most likely cause | Go to |
|---|---|---|
| Invalid file type. Please upload a CSV, XLS, or XLSX file. | PDF, contract note or other file type | Wrong file |
| File format not recognized for selected broker. You can still import with default mapping. | A P&L or holdings report instead of the tradebook, or an unsupported layout | Wrong file |
| Error processing file. Please check the format. or Error parsing file | Damaged file, extra header rows or edited columns | File won't read |
| Invalid CSV format: Missing required columns | A template header is missing or renamed | Template columns |
| Another import is already in progress | An import on the same account is still running | Wait for it to finish, then try again |
| RMoney Capex import requires Total Tax from the statement footer | The RMoney statement was trimmed | Re-upload the full Portfolio Statement Excel file, including its footer |
| Menu items show (Trade limit reached) | Your plan's trade-import allowance is used up | Trade limit |
| Fewer orders imported than rows in the file | Blank, zero-quantity or non-executed rows were skipped | Fewer rows |
| Trades on the wrong dates | Dates reformatted by a spreadsheet app | Dates |
| Duplicate trades after importing | The file overlapped trades already synced or imported | Duplicates |
| Option P&L far too large or small, or trades left open | Quantity in lots instead of units, or a missing buy or sell | Wrong P&L |
Wrong file or wrong report
TradeLyser needs every individual buy and sell with its date and time, quantity and price.
- Download the tradebook or executed-trades report from your broker for the dates you want, not a P&L, tax or holdings report.
- Upload it unedited with Import Trade. Not sure where your broker's export is? Open the Step-by-step Guide on the Select File screen.
- If the format still isn't recognised and the preview looks wrong, copy the trades into the TradeLyser CSV template and use Import Template instead.
The file won't read
- Download a fresh copy from your broker. Opening and re-saving it in a spreadsheet app can change separators, dates and number formats.
- Remove nothing from the broker file. Extra summary rows from NeoStox and RMoney statement layouts are handled automatically.
- For the template, save as CSV (comma separated),
.xlsxor.xls. Only the first sheet of an Excel file is read.
Missing required columns
The template needs five headers, spelled exactly as in the downloaded file (lowercase, with underscores): symbol_name, action, quantity, price and timestamp. Copy the header row from a fresh template (Download CSV Template) and keep every column, even optional ones you leave empty.
Fewer orders than rows
These rows are skipped on purpose:
- Blank rows, and rows with an empty symbol or a quantity or price of zero or less (template).
- Orders that weren't executed. In Fyers files, for example, only Traded orders are imported; pending, cancelled and rejected orders are skipped.
Check the CSV Preview record count and the Mapped Orders list before clicking Import Trades.
Trades land on the wrong dates
- Template timestamps must be day first,
DD/MM/YYYY HH:mm:ss, in IST, for example24/10/2025 09:15:30. - Spreadsheet apps often swap day and month or drop the seconds. Format the
timestampcolumn as text before you type or paste dates. - Imported trades are dated by their close time in the Trades Log and Dashboard, so a position opened on Monday and closed on Tuesday appears on Tuesday.
Duplicate trades after an import
File imports aren't guaranteed to skip orders already in the account. If the file overlaps days you have already synced or imported, the same orders can come in twice.
Single completed trades can't be deleted, because TradeLyser builds them from orders. To clean up:
- Download a CSV of the account's trades from the Trades Log (Download CSV) as a backup.
- On the Pro plan, choose Clear Trades in the account's ⋯ actions menu and type CLEAR to confirm. This permanently deletes all the account's trades, positions, journals and orders.
- Import one clean file whose date range doesn't overlap, ending on the day before your first sync.
See Delete trades for details.
Sync History (Dhan, ICICI and Upstox) does skip orders already stored for the account, so it is the safer way to backfill those brokers.
P&L or open trades look wrong after import
- Quantity is in units, not lots. For one lot of an option with a lot size of 75, the template needs
75. - Option symbols in the template use symbol +
YYMMDDexpiry + strike +CE/PE, such asNIFTY25013024500CE. - Every buy needs its sell. If the file starts after a position was opened, the closing order has nothing to match and shows in Open Positions. Import the opening day too, or close the position by hand.
- Charges counted twice: if your file already includes charges, tick Avoid fees (₹0) and Avoid taxes (₹0) in the Map & Import step, or set the account's default fees to zero.
More on reconciling numbers: Incorrect P&L.
Trade limit reached
Each imported execution counts towards your plan's trade-import allowance. When it is used up, Sync Trades, Sync History, Import Trade, Import Template and Manual Entry are greyed out with (Trade limit reached). Upgrade from Subscription in the avatar menu, or wait until the allowance resets.
Check an import worked
- Click the header refresh icon.
- Select the account in the account selector and set a date range that covers the file.
- Open the Trades Log and compare the trade count and a few trades with your broker's report.
- Each import is also listed in Settings → Sync History.
Frequently asked questions
Why does TradeLyser say my file format is not recognized?
You probably uploaded a P&L or holdings report, or an edited file. Upload the broker's tradebook unedited, or use the TradeLyser CSV template.
Can I import Excel files?
Yes. Both Import Trade and Import Template accept .csv, .xls and .xlsx.
Will importing a CSV overwrite my synced trades?
No. Imports add orders to the account. Overlapping dates can create duplicates instead, so import only the dates you're missing.
How do I undo a bad import?
Single trades can't be deleted. On the Pro plan, use Clear Trades on the account, then import a corrected file. Download a CSV of your trades first, because Clear Trades is permanent.
Should I edit my broker's file before importing?
No. Upload the broker file as downloaded. If you need to change it, move the trades into the TradeLyser template instead.