Skip to content
DiviCompasshome

Help centre: connect Trading 212 or import a broker file

Step-by-step guides for getting your holdings in, from a broker file or by connecting Trading 212, and answers to common questions.

Getting started

  1. Create a free account

    One portfolio and up to 10 holdings, no card needed. A portfolio usually matches one account at your broker, such as an ISA or a SIPP.

  2. Add your holdings

    By hand: My portfolio, then Add transaction for each purchase. From a broker file: see Import a broker file. Trading 212 users with Pro: connect the account and everything is added for you.

  3. Check your dashboard

    It shows your total value, the income you can expect over the next 12 months, what is coming up, and your portfolio's value over time. Declared dividends and estimates are always shown apart.

Connect Trading 212 Pro

Connecting your Trading 212 Invest or Stocks ISA account adds your trades and dividends to a portfolio automatically, twice a day, and shows the cash in the account. It uses a read-only API key: DiviCompass can read your history, but the key cannot place trades or move money.

Create an API key in Trading 212

  1. In the Trading 212 app or website, open Settings, then API (Beta).
  2. Choose to generate a new API key and give it a name such as DiviCompass.
  3. Tick these permissions:
    • History: your trades and dividends. Required.
    • Portfolio: what you hold now, used for the holdings check and for "only shares I hold now".
    • Account data: the cash in your account, added to the portfolio's value.
    Leave Orders off, so the key can never trade.
  4. Copy the API key and the secret. Trading 212 shows the secret only once, so keep the page open until you have pasted both.

Each Trading 212 account needs its own key: an ISA and an Invest account are connected separately, each to its own DiviCompass portfolio.

Connect it in DiviCompass

  1. Go to Import and open Connect Trading 212.
  2. Choose the portfolio to add trades to, and whether it is a real-money or practice account.
  3. Choose How far back: everything, this year, the last month, or from a date you pick.
  4. Choose Which shares: everything you have traded, or only the shares you hold now.
  5. Paste the key and secret and choose Connect and sync.

What happens next

  • The first syncReads your history in parts: Trading 212 allows 20 requests a minute, so a long history takes a few minutes and carries on by itself. The panel says "Loading history" until it is done.
  • After thatIt syncs twice a day. Use Sync now any time.
  • Nothing is added twiceEach trade and dividend is recognised by its Trading 212 reference, so syncing again or reading the history again never duplicates it.
  • Fractional sharesKept exactly; the site shows share counts to 2 decimal places.
  • Shares DiviCompass does not cover yetKept, requested automatically, and added once covered.
  • CashCash in the account is shown on the Trading 212 panel, on Holdings, and in your dashboard's Total value.

Security and disconnecting

Your key and secret are checked with Trading 212, then stored encrypted. They are never shown again, never sent to your browser and never included in your data download. Disconnect deletes them straight away; trades already added stay in your portfolio. You can also delete the key in Trading 212 at any time.

Import a broker file

Every broker can export your transaction history as a CSV file. Importing it adds your purchases, sales, transfers and dividends in one go.

Getting the file from your broker

Trading 212 (file)
  1. In the Trading 212 app or website, open History.
  2. Choose Export history (the download icon).
  3. Pick the dates. Trading 212 allows up to 12 months per file, so for a longer history export one file per year.
  4. Tick Orders, Dividends and Transactions, then export and save the CSV.

Pro members can skip files altogether and connect Trading 212 instead (see Connect Trading 212 above). Older and newer export layouts both work.

AJ Bell
  1. Sign in on the AJ Bell website and choose My account (top right).
  2. Go to Documents and statements, then Transaction history.
  3. Set the dates to cover everything since you opened the account.
  4. Download the file as CSV.

Each account (for example ISA and SIPP) has its own history: import each into its own portfolio.

Hargreaves Lansdown
  1. Sign in on the Hargreaves Lansdown website and open the account you want (for example Stocks and Shares ISA).
  2. Open its transaction history (sometimes called capital account history).
  3. Choose a date range. If it only allows up to 12 months, download one file per year.
  4. Download as CSV, not PDF.

Hargreaves Lansdown files have no tickers, so shares are matched by name and SEDOL. You confirm any match we are unsure of.

interactive investor
  1. Sign in on the interactive investor website.
  2. Choose Portfolio at the top, then Transaction history.
  3. Set the dates to cover everything since the account opened.
  4. Use the download icon on the right and choose CSV.
Freetrade
  1. Open the Freetrade app and go to the Activity tab.
  2. Tap the download button (an upward arrow) in the top-right corner.
  3. Choose All Activity and save the CSV to your phone or computer.

Freetrade's file does not include shares transferred in from another provider. Add those by hand as a transfer in.

Interactive Brokers
  1. Sign in to the Client Portal and go to Performance & Reports (or Reports), then Flex Queries.
  2. Next to Activity Flex Query, choose + to create one.
  3. Under Sections choose Trades, select Executions, tick Select all and save.
  4. Give it a name and choose Create.
  5. Run it with a custom date range and format CSV. Interactive Brokers allows up to 365 days per run, so run it once per year for a longer history.

This brings in your trades. The dividends you are owed are worked out from each company's declared dividends; record what you were actually paid on Dividend income if you want to compare.

Any other broker
  1. Find your broker's transaction history or statements and download them as CSV. Excel and PDF files cannot be read: open them in a spreadsheet and save as CSV first.
  2. Upload it on the Import page. If we do not recognise the layout, you match its columns once (date, type, share, quantity, price) and we remember that layout for next time.

Moving from a spreadsheet? Download the DiviCompass template from the Import page, fill it in and upload it.

Broker menus change from time to time. If a step above no longer matches, look for transaction history or statements and an option to download or export as CSV, or tell us and we will update this guide.

In DiviCompass

  1. Go to Import and check the portfolio at the top of the page is the one you want.
  2. Under Import from your broker, choose the CSV file and select Preview import.
  3. Check the preview. Each share is matched by ISIN, SEDOL, ticker or name; where we are unsure, choose the right company from the list.
  4. Select Import. Only the lines marked Ready are saved.

Lines already imported are recognised and skipped, so you can upload a newer export of the same account, or one file per year, safely. Deposits, withdrawals, interest and currency conversions are left out. Your file itself is never kept.

Shares you also entered yourself

If you had already added a share by hand or from a file, the sync does not add Trading 212's trades on top, because the share would count twice. It lists the share under Shares you also entered yourself, showing your entries next to Trading 212's, and you choose:

  • Use Trading 212'sYour entries for that share are removed and Trading 212's trades and dividends are used. Undo puts yours back. Usually the best choice.
  • Keep mineYour entries stay, and only Trading 212 trades after your last entry are added.
  • Keep bothFor a share you also hold at another broker in the same portfolio.

Checking your holdings

On the Trading 212 panel, Check holdings puts the number of shares Trading 212 holds next to the number in DiviCompass for every share. Where they differ:

  • Looks rightKeeps your portfolio as it is, for example when you hold the same share at another broker too.
  • Incorrect: use Trading 212Corrects it. If the share was counted twice, Trading 212's history is used for it; any other gap is corrected with a transfer at Trading 212's average price.

After importing

  • HoldingsShows each share with its count, average cost, value, income and yield. Share counts and average cost are adjusted for splits and other corporate actions.
  • Something wrong?On Holdings choose Edit next to a share to fix a transaction, move it to the right company, or remove it.
  • A sale bigger than your holdingUsually means an earlier purchase is missing (for example shares transferred in from another broker). Add it by hand as a purchase or transfer in, then import again.
  • DividendsDividends you were paid can be recorded on Dividend income, so you can check them against what was expected.
  • The value chartMay show a holding at cost for a day or two after importing older trades, while its earlier prices are collected.