Skip to content

Trading 212

jayjay181818 edited this page Nov 17, 2026 · 1 revision

Trading 212

Stockbar can read your Trading 212 positions and show them next to, or instead of, holdings you entered by hand. The connection is read-only: Stockbar never places orders and does not need the Orders - Execute permission.

Everything is in Settings → Connections → Broker / Portfolio Provider. Trading 212 works without Stockbar's Python environment.

Safety first

  • Read-only. Stockbar asks only for account data, and never needs order execution. When you create your API key at Trading 212, do not enable Orders - Execute.
  • Nothing changes until you link. Test Connection and Preview Import read your account and change nothing: no holdings, backups, history, market caches or Core Data rows. Linking is a separate, confirmed step.
  • Credentials stay in your Keychain. The API Key and API Secret are stored in the Keychain only. After you save them, the fields stay empty on purpose and show "Stored in Keychain" instead. Logs redact keys, auth headers and account identifiers.
  • A failed or empty response never deletes your portfolio.
  • A ticker renamed by the broker is reported as missing, never deleted (3.6.0).
  • Your manual holdings are kept. See Portfolio and Holdings.
  • The whole section is inactive while Folync is the active portfolio source.

What you need

A Trading 212 API Key and API Secret with these permissions (the same table is shown in Settings under Permissions):

Permission Requirement Used for
Account data Required Account summary, cash, total value, profit and loss, positions. Needed for Test Connection and Preview Import.
Metadata Recommended Reliable instrument mapping. Preview still works with lower confidence if the position fields are usable.
History - Dividends Optional future Dividend history. Not required now.
History - Transactions Optional future Transaction and import audit history. Not required now.
History - Orders Optional future Read-only order audit history. Not required now.
Orders - Execute Never required Nothing. Stockbar must not request trading permission.

Stockbar supports Trading 212's Invest and Stocks ISA accounts. Choosing the account type CFD (unsupported by API) is allowed but disables the actions and shows a warning, because Trading 212's public API lists Invest and Stocks ISA only.

Set it up

  1. Open Settings → Connections and switch on Enable Trading 212. It is off by default.
  2. Choose the Environment: Demo / Paper (the default) or Live / Real Money. The two keep separate account keys and caches.
  3. Choose the Account Type: Stocks & Shares ISA (the default), Invest / General, CFD (unsupported by API) or Unknown / Custom. Set the Account Label, for example Trading 212 ISA.
  4. Paste the API Key and API Secret and choose Save Credentials (Update Credentials if some are already stored). The eye buttons show or hide what you type.
  5. Choose Test Connection.
  6. Choose Preview Import. This reads your account and proposes how each broker position maps to your holdings.
  7. Review the preview, then choose Link Matched Holdings and confirm.
  8. Leave Auto-sync on to keep linked holdings up to date.

Reading the preview

The Read-Only Import Preview summarises the result: how many manual holdings matched, how many rows are broker-only, how many have quantity differences and how many need review. Its table shows, for each row, Ticker, Instrument, Manual match, Account, Qty, Qty Delta, Avg, Broker Price, Value, P/L and Match. Stockbar maps Trading 212's provider tickers to canonical instruments (including London-listed USD ETFs) before matching.

Linking

Link Matched Holdings saves broker links only after you confirm. If some holdings have a different quantity from the broker, the dialog offers:

  • Link Exact Matches Only, or
  • Link Including Differing Quantities, after which the Trading 212 quantity replaces the manual one at the next sync.

Import Broker-Only Holdings creates new holdings only for clean broker-only rows and saves broker links so future syncs update them. Existing manual holdings are not deleted or migrated.

A link is keyed by the broker account and the instrument, so a ticker or display-name change does not create a second holding. A link also records the instrument's ISIN.

What linked holdings do

A linked holding takes its quantity, current price, value, average cost and profit and loss from Trading 212, and Stockbar does not call the market-data providers for it during normal broker sync. Day profit and loss keeps Stockbar's own previous-close calculation. While a matching valuation snapshot is fresh, Net Value and the summaries use the broker's account value, including cash (2.4.4). A stale, missing or mismatched snapshot falls back to Stockbar's own calculation.

The positions are read-only in Stockbar. You can still change their menu bar visibility and alerts.

History and charts for linked holdings still use the market-data providers.

Sync settings

Under Linked Holding Sync:

Setting What it does Default
Auto-sync: Refresh linked holdings periodically Syncs linked holdings on a timer On
Interval 30 sec, 1 min, 5 min, 15 min or 30 min 5 min
Removed holdings: Delete linked manual holdings missing from Trading 212 If a linked position disappears from Trading 212, delete the matched manual holding and its link. Asks for confirmation when you switch it on. Off
Portfolio changes: Check hourly and automatically apply Trading 212 holding changes An hourly reconciliation that syncs linked holdings and, if enabled, imports clean new positions Off
New holdings: Automatically import clean broker-only holdings during hourly checks Needs the previous setting Off

Sync uses one Trading 212 positions request per cycle; Stockbar does not poll each ticker separately. With removal switched off, a position that disappears is reported as missing and your manual holding stays.

You can also act by hand with Sync Linked Holdings and Reconcile Holdings Now, and Clear Preview removes a preview from the screen. If automatic sync keeps failing, the section says so in orange.

Older versions defaulted to a 30-second interval; it was changed to five minutes to save battery and API calls, and existing installs were moved.

If something goes wrong

  • Test Connection fails. Check the environment (Demo or Live), the API Key and Secret, and that the key has Account data permission.
  • Preview is low-confidence. Enable the Metadata permission.
  • A linked holding went missing. Trading 212 no longer reports it. Check Removed holdings.
  • To remove the credentials, use Clear Credentials…. Syncing stops until you enter them again; your holdings stay as they are.

See also Troubleshooting and Privacy and Security.

Clone this wiki locally