How to import your trades from a CSV file

If your broker isn't directly supported by OnePortfolio, you can still import your trading history using a custom CSV file. This guide explains the required format and walks you through the import process. The format is flexible and supports all the necesary transaction types.

1. Transaction Types

Buy

Purchase of securities.

Sell

Sale of securities.

Deposit

Cash deposits to your account.

Withdrawal

Cash withdrawals from your account.

Fee

Various broker fees.

Tax

Tax-related charges like Dividend tax.

Dividend

Dividend payments.

Exchange

Currency exchange transactions.

Interest

Interest earned or paid.

2. Required Fields

Your CSV file must include the following mandatory fields:

TransactionType

The type of transaction from the list above (Buy, Sell, Deposit, etc.).

Symbol/ISIN

The security identifier - either ISIN or symbol. If you know in which exchange you purchased or sold your asset, we strongly recommend adding the Cross listing extension. Leave empty for cash transactions like deposits and withdrawals.

DateTime

Transaction date and time in ISO 8601 format. Supports various timezone formats including UTC, explicit offsets, and named timezones.

Currency

Three-letter ISO 4217 currency code (e.g., USD, EUR, CHF).

Quantity

The amount of units involved in the transaction. If you bought or sold 10 stocks you have to specify 10 in this field. In the case of Dividend, Withdrawal, Interest, Tax and Exchange operations, this field will be used as final figure. If you deposit 1000 USD you should use this field for that amount. With the exception of Interest (paid/earned) no need to specify sign.

FinalAmount*

This is a mandatory field that only applies to Exchange operations. This field is used to describe the final amount converted. No sign needed.

3. Optional Fields

These fields can be included for additional transaction details. In the case of unit price and final amount, you have to provide one of those (see bellow) in order to calculate the transaction values.

UnitPrice

Price per unit in the specified currency. We recomend to provide this figure for data acuracy but since some brokers may not provide the unit price paid on their reports, you can leave it empty, and provide the final amount (see bellow) and it will calculate it using the quantity and the final amount. No sign needed

FinalAmount

The final amount paid. Depending of your broker this amount may include fees or no. If you have this figure we recomend to provide it, but if its easier for you to only provide the quantity and unit price final amount it will be calculated. No sign needed

Fee

Transaction fee amount in the fee currency. No sign needed.

FeeCurrency

Three-letter ISO 4217 currency code for the fee.

ExchangeTargetCurrency

Target currency for exchange transactions (e.g., USD when exchanging from CHF to USD).

BrokerTradeId

Your broker's unique identifier for the transaction.

Comments

Additional notes or description for the transaction.

5. Important Notes

When preparing your CSV file, keep in mind:
• Always include the header as first line (see Example CSV at the end of this guide).
• Fields are separated by commas, not semicolons.
• Empty or optional fields should have no value or spaces between commas.
• Data fields should not be quoted.
• DateTime field supports various ISO 8601 formats including different timezone notations.

6. Import Process

To import your CSV file:
1. Log into your OnePortfolio account.
2. Navigate to the Transactions section.
3. Click on 'Import Transactions'.
4. Drag and drop your CSV file or click to select it.
5. Confirm asset if necessary.

4. Example CSV

Here's an example CSV file showing various transaction types with different date formats and timezones:

Headers

TransactionType,Symbol/ISIN,DateTime,Currency,Quantity,UnitPrice,FinalAmount,Fee,FeeCurrency,ExchangeTargetCurrency,BrokerTradeId,Comments

Example Transactions with Unit prices

Deposit,,2024-02-22 00:00:00,CHF,10000,,,,,,Deposit in CHF Exchange,,2024-03-04 15:50:16,CHF,7007.92,0.8849,8000,,,USD,,CHF - USD Exchange Buy,WSML.L,2024-07-16 05:20:05,USD,1,7.468,,1.909678139,USD,,,ISHARES MSCI WLD SMALL CAP Buy,WSML.L,2024-07-16 05:20:05,USD,333,7.468,,0.0666,USD,,,ISHARES MSCI WLD SMALL CAP Tax,WSML.L,2024-09-05 00:00:00,USD,0.18,,,,,,,WSML.L(IE00BF4RFH31) CASH DIVIDEND USD 0.18 PER SHARE - US TAX Dividend,WSML.L,2024-12-27 00:00:00,USD,18.03,0.7894,,,,,,WSML.L(IE00BF4RFH31) CASH DIVIDEND USD 0.7894 PER SHARE (Ordinary Dividend) Sell,WSML.L,2025-03-04 03:20:33,USD,920,7.443,,3.60778,USD,,,ISHARES MSCI WLD SMALL CAP Sell,WSML.L,2025-03-04 03:20:33,USD,0.072,7.443,,0.000282348,USD,,,ISHARES MSCI WLD SMALL CAP Withdrawal,,2025-03-18 00:00:00,CHF,100,,,,,,,Withdrawal CHF Interest,,2025-04-01 00:00:00,CHF,-0.09,,,,,,,Interest Paid Interest,,2025-04-01 00:00:00,CHF,0.02,,,,,,,Interest Earned

Example Transactions without Unit prices (with FinalAmount)

Deposit,,2024-02-22 00:00:00,CHF,10000,,,,,,,Deposit in CHF Exchange,,2024-03-04 15:50:16,CHF,7007.92,,8000,,,USD,,CHF - USD Exchange Buy,WSML.L,2024-07-16 05:20:05,USD,1,,7.468,1.909678139,USD,,,ISHARES MSCI WLD SMALL CAP Buy,WSML.L,2024-07-16 05:20:05,USD,333,,2486.844,0.0666,USD,,,ISHARES MSCI WLD SMALL CAP Tax,WSML.L,2024-09-05 00:00:00,USD,0.36,,,,,,WSML.L(IE00BF4RFH31) CASH DIVIDEND USD 0.18 PER SHARE - US TAX Dividend,WSML.L,2024-12-27 00:00:00,USD,18.03,,,,,,WSML.L(IE00BF4RFH31) CASH DIVIDEND USD 0.7894 PER SHARE (Ordinary Dividend) Sell,WSML.L,2025-03-04 03:20:33,USD,920,,6847.56,3.60778,USD,,,ISHARES MSCI WLD SMALL CAP Sell,WSML.L,2025-03-04 03:20:33,USD,0.072,,0.535896,0.000282348,USD,,,ISHARES MSCI WLD SMALL CAP Withdrawal,,2025-03-18 00:00:00,CHF,100,,,,,,,Withdrawal CHF Interest,,2025-04-01 00:00:00,CHF,-0.09,,,,,,,Interest Paid Interest,,2025-04-01 00:00:00,CHF,0.02,,,,,,,Interest Earned