Skip to main content

How to Import Trades into TradeLyser from a CSV or Excel File

If your broker doesn't offer Auto Sync, or you want trades from before you connected, you can import them from a file. TradeLyser reads the trade file you download from your broker (CSV, XLS or XLSX), shows you a preview, maps each row to an order and builds your completed trades. A typical import takes about five minutes.

Once imported you can:

  • Review every trade in the Trades Log and Daily Journal, with P&L, fees and taxes.
  • Analyse months of history, not just the trades since you connected.
  • Fill gaps between days you synced.

What you need​

RequirementDetails
A TradeLyser account for the brokerAdded from Accounts → Add Account. Choose File Upload as the import method if you won't use Auto Sync.
Your broker's trade fileA tradebook or executed-trades export for the dates you want, in .csv, .xls or .xlsx
Or the TradeLyser templateFor brokers whose file isn't recognised. See TradeLyser CSV template.

Broker file or TradeLyser template?​

OptionUse it whenWhere to find it
Import Trade (broker file)You have the file your broker exports. Dedicated formats exist for Zerodha (Console Tradebook), Fyers, Dhan, 5paisa, NeoStox and RMoney (Portfolio Statement). Other brokers' files go through a generic parser.Account ⋯ actions menu, or the header Import Trade button when a single File Upload account is selected
Import TemplateYour broker's file isn't recognised, or you're combining trades from several sourcesAccount ⋯ actions menu
Upload the trade file, not a P&L report

TradeLyser needs every individual buy and sell with its time, quantity and price. P&L, tax and holdings reports summarise trades and won't import correctly. Download the tradebook or executed-orders report, and don't edit its columns before uploading.

Step 1: Select File​

  1. Open Accounts, then the ⋯ actions menu on the account, and choose Import Trade.
  2. Check the Account and Broker shown at the top of the wizard.
  3. Under Upload CSV/Excel File, click or drag your file into the box.
  4. TradeLyser detects the format and confirms it with a Detected ... format message naming your broker's format. NeoStox summary rows and RMoney statement layouts are handled automatically.

Not sure how to export from your broker? Open the Step-by-step Guide on the same screen for your broker's export instructions.

Step 2: Preview Data​

  1. Review the CSV Preview. It shows the rows read from your file and the total number of records.
  2. Check that dates, symbols, quantities and prices look right. If they don't, click Back and upload the correct file.
  3. Click Map Data. TradeLyser converts each row into an order and calculates fees and taxes from the account's settings. A progress bar shows how many rows are done.

Step 3: Map & Import​

  1. Review the Mapped Orders (symbol, action, quantity, price, fees, taxes and time, latest first).
  2. Under Calculation Options, tick any you want:
    • Avoid fees (₹0)
    • Avoid taxes (₹0)
    • Avoid slippages (₹0)
  3. Click Import Trades. You see Import started for N orders. Processing continues in the background, then Successfully imported N orders.
  4. Click the refresh icon in the header so every page shows the new trades.

If the account's Set Fees & Tax has Exclude Fees, Tax, and Slippage calculations in Order Processing turned on, these options are ticked for you. For RMoney Portfolio Statements the options are locked, because TradeLyser uses the Total Tax from the statement footer instead.

These choices are permanent

Imported orders are matched into trades using the account's calculation method (FIFO, LIFO or WA). The calculation and import methods can't be changed after the account is created, so pick them before importing a large history.

Import with the TradeLyser CSV template​

The Import Template screen in TradeLyser, with Download CSV Template, Upload Completed CSV and the field descriptions

  1. Open the account's ⋯ actions menu and choose Import Template.
  2. Click Download CSV Template, fill it in (one row per execution) and save it as .csv, .xlsx or .xls.
  3. Under Upload Completed CSV, click Choose File.
  4. Check the Preview and click Show Mapping.
  5. Optionally tick Exclude Fees, Exclude Taxes or Exclude Slippage, then click Import Trades.
ColumnRequiredFormat
symbol_nameYesEquity RELIANCE, futures NIFTY25JANFUT, options NIFTY25013024500CE (symbol, YYMMDD expiry, strike, CE/PE)
actionYesBUY or SELL
quantityYesNumber of units
priceYesExecution price
timestampYesDD/MM/YYYY HH:mm:ss in IST
fees, taxes, slippageNoAmounts in ₹
product_typeNoCNC, MIS or NRML
broker_order_id, expiry, strike, exchange, order_typeNoExpiry as YYYY-MM-DD

Field-by-field help and more symbol examples are on the TradeLyser CSV template page.

Common CSV import errors​

Message or problemFix
Invalid file type. Please upload a CSV, XLS, or XLSX file.Save the file as .csv, .xls or .xlsx. PDFs and contract notes can't be imported.
File format not recognized for selected broker. You can still import with default mapping.Check that you exported the tradebook rather than a P&L report. If the preview still looks wrong, use the TradeLyser template.
Error processing file. Please check the format.The file is damaged or has extra header rows. Download a fresh copy from your broker and upload it unedited.
Invalid CSV format: Missing required columns (template)Add the missing columns listed on screen. All five of symbol_name, action, quantity, price and timestamp are required.
Another import is already in progressWait for the current import on the account to finish, then try again.
RMoney Capex import requires Total Tax from the statement footerRe-upload the full Portfolio Statement Excel file, including its footer.
Menu items show (Trade limit reached)Your plan's trade-import limit is used up. Each imported execution counts towards it.
Duplicate trades after importingThe file overlapped dates already synced or imported. End the file's date range before your first sync.
Options P&L looks wrongCheck symbol format and lot quantities. See Incorrect P&L.

More fixes: CSV import errors.

Frequently asked questions​

Can I import an Excel file instead of CSV?​

Yes. Both the broker import and the template accept .csv, .xls and .xlsx.

Which brokers' files does TradeLyser recognise?​

Zerodha (Console Tradebook), Fyers, Dhan, 5paisa, NeoStox and RMoney (Portfolio Statement) have dedicated formats. Other brokers' files use a generic parser. If yours isn't recognised, use the TradeLyser CSV template.

Can I import trades into an Auto Sync account?​

Yes. Import Trade and Import Template are in the actions menu of every account, which is how Zerodha users bring in Console history. See Import Zerodha trade history.

Do I need to include fees and taxes in my file?​

No. TradeLyser calculates them from the account's Set Fees & Tax settings unless you tick the avoid or exclude options.

Next steps​