All guides
PortfolioOctober 31, 2026·7 min read

Trading 212 Portfolio Analysis: Using the API Key Safely

Cover: Trading 212 Portfolio Analysis: Using the API Key Safely

A Trading 212 portfolio analysis means taking the positions and cash in your Trading 212 account and measuring them: how much each holding weighs, how much sits in cash, where the gains and losses are, and what news is moving each name. You can do it by hand from the app, or let a tool read your account through Trading 212’s Public API with an API key you create and control.

What should a Trading 212 portfolio analysis cover?

The app already shows you each position’s value and return. An analysis adds the view across positions, which is where most surprises hide. A useful first pass looks at six things:

  1. Weights. Each position’s value divided by the account total, including cash.
  2. Cash share. Uninvested cash is a position too, and a large one changes how the rest of the account behaves.
  3. Unrealized gain or loss per position, in money and as a percentage of cost.
  4. Overlap. An ETF and the stocks inside it can add up to more exposure to one company than either line shows.
  5. Currency. A euro-based account holding US stocks carries dollar exposure on top of the stock’s own moves.
  6. Upcoming events. Earnings dates and recent news for each holding.

If you hold more than one account, such as an Invest account and a Stocks ISA, run the numbers on the combined total as well as on each account. Concentration that looks moderate in one account can be large across both.

How does the Trading 212 API work?

Trading 212 runs a Public API that is still labelled beta and “under active development”, according to its API documentation. Each request carries an API key and a secret, sent together as an HTTP Basic authorization header. There are separate addresses for practice (demo) and live accounts, and rate limits apply per account no matter which key or IP address makes the call.

Not every account can use it. Trading 212’s help centre says the Public API section is visible only for the General Invest Account and the Stocks & Shares ISA, and that SIPP accounts aren’t currently supported.

What a key can do depends on the permissions you tick when you create it. Trading 212 lets you choose read-only access or add permissions such as placing orders, with categories that include account data, history, orders and portfolio. For live accounts, the API can place market, limit, stop and stop-limit orders, which is why the permission choice matters.

How do you create a Trading 212 API key?

You create it in the Trading 212 app, and it takes a couple of minutes. The steps below follow the help centre as of 31 October 2026:

  1. Accept the mandatory risk warning about API access. The option to generate a key appears only after that.
  2. Open the menu (☰), then Settings, then API (Beta), and choose Generate API key.
  3. Review the permissions and tick only what the app you’re connecting needs.
  4. Name the key and set IP access restrictions if the app can tell you which addresses it connects from.
  5. Submit the form. Trading 212 shows an API Key and an API Secret Key.

Copy the secret straight away. The help centre says it is displayed only once, and if you lose it you have to generate a new key pair.

Is it safe to give an app your Trading 212 API key?

It carries risk, and Trading 212 says so plainly. Its help centre warns that sharing API keys with third-party applications “involves potential risks”, that it has no official partnerships with third-party apps and can’t guarantee their security, and that you should treat the secret with the same care as your account password.

A few habits reduce that risk without much effort:

  • Grant read permissions only for an analysis tool. Leave anything that places or cancels orders switched off.
  • Use one key per app, named after the app, so you know which key to remove if you stop using it.
  • Restrict IP access where the app supports it; the help centre calls unrestricted access less secure.
  • Delete keys you no longer use. Trading 212 says deletion is permanent and immediately disables any app using that key.

What does an analysis look like? A worked example

Here is a hypothetical Invest account worth €20,000, with fictional holdings:

  • Northwind Robotics: €6,800 market value, bought for €4,000.
  • A broad world-index ETF: €7,000, bought for €6,500.
  • Two smaller stocks: €3,200 combined, bought for €3,600.
  • Cash: €3,000.

The app shows four lines that each look reasonable. The analysis tells a different story. Northwind is 34% of the account and 40% of the invested money (€6,800 of €17,000). It also accounts for €2,800 of the €2,900 total unrealized gain, so nearly all of the account’s profit rides on one stock. Cash is 15% of the account, so the other 85% carries all the market risk.

If the world ETF holds Northwind as well, the true exposure is a little higher than 34%. And because Northwind is a US-listed fictional company priced in dollars in this example, a 10% fall in the dollar against the euro would cut its euro value by about 10% even if the share price didn’t move. None of this says the account is wrong. It says where the risk sits, which is the question an analysis is for.

What can’t a positions snapshot tell you?

A sync of positions and cash shows where the account stands today. It says little about how you got there. Three gaps matter most for self-directed investors.

First, your own timing. If you deposited most of your money just before a fall, the account can show a loss even though the holdings did fine over the year. Separating the two needs a return measure that strips out deposits and withdrawals, which our post on time-weighted vs money-weighted return walks through with numbers.

Second, closed trades. Unrealized gains on open positions are only part of the record. Positions you sold, dividends paid and fees charged sit in your history and statements rather than in today’s holdings, and they decide what you’ve made overall. Third, anything held elsewhere. A pension, an employer share plan or an account at another broker changes your real concentration, and no single broker connection sees it.

None of these gaps makes a snapshot useless. They mean a snapshot answers “what do I own and how is it weighted?” well, and “how good were my decisions?” only partly.

How FinCoach AI analyzes a Trading 212 portfolio

FinCoach AI connects to Trading 212 through the API key route described above. Its Settings page has a Trading 212 section with API Key and API Secret fields and a Test Connection button. Save the key, and FinCoach syncs your positions and cash into the Portfolio page through Trading 212’s API. It only reads. The calls it makes fetch positions, cash, account details and instrument names, and none of them place orders, so a key with read permissions is enough. There is no CSV import for Trading 212.

The Overview tab then shows the holdings table with total value, total P&L, unrealized P&L and free cash. Each holding has a Check news button, which lists recent headlines with an AI “Impact to price” mark classing each one as positive, negative or neutral for the short term. A Positive aspects button runs Claude with web search for the case in the company’s favor, and AI News Analysis summarizes a story and its possible price impact. The page also carries a watchlist, an earnings calendar and upcoming events for what you hold.

For the cross-position questions, the AI Coach tab answers from your synced holdings, for example “How concentrated am I right now?”. Any single ticker can go through the full stock analysis report.

Two limits are worth knowing. Trade-history features (Trading Patterns and Trading History) are built from Interactive Brokers PDF statements, so they don’t cover Trading 212 trades. And every AI answer carries the label “AI-generated, a subjective opinion, not financial advice. Can be incomplete or wrong.”

Keep reading

Educational, not financial advice. FinCoach AI is not a broker or investment adviser, and AI output can be wrong; check anything important before you act. Figures as of 31 October 2026; sources linked.

Connect a read-only Trading 212 key and see your weights. Launch the app.

Launch app

Frequently asked questions

Does Trading 212 have an API?

Yes. Trading 212 runs a Public API, still labelled beta, that works with a key and secret you generate in the app under Settings, then API (Beta). It is available for the Invest account and the Stocks and Shares ISA.

Can I use the Trading 212 API with a SIPP?

Not at the moment. Trading 212’s help centre says SIPP accounts are not currently supported and the API section is visible only for the Invest account and the Stocks and Shares ISA.

Can an app place trades with my Trading 212 API key?

Only if you gave the key order permissions. Trading 212 lets you pick read-only access or add permissions such as placing orders when you create the key, so an analysis tool needs read permissions only.

What happens if I lose my Trading 212 API secret?

You have to create a new key pair. Trading 212 shows the secret once, at creation, and can’t display it again. Delete the old key so nothing keeps using it.

Can I import a Trading 212 CSV into FinCoach AI?

No. FinCoach AI connects to Trading 212 only through an API key and secret and syncs positions and cash that way. You can also add holdings by hand.

This article is for educational and informational purposes only and is not financial, investment, tax or legal advice. FinCoach AI is not a broker or registered investment adviser. Investing involves risk, including the possible loss of capital. Do your own research and consider a licensed professional before acting. See our Terms.