Trading 212 API Update 🛠️

It is perhaps the best feature of t212. How come it’s being removed? What are the alternatives to manage a pie programmatically? Please do not remove pies, it’s absolutely the best feature of t212.

1 Like

I would love multy currency transactions or at least stock currency transaction

If you’re asking in connection with UK stocks ISAs, that is not possible under HMRC rules. You can hold qualifying securities quoted in currencies other than GBP in a stocks ISA, but you can’t hold cash other than GBP. So buy-sell trading strategies involve forex friction each way.

I believe that GIA (Invest) accounts can hold multiple currencies in cash but, of course, you pay CGT on gains (if you exceed your personal allowance). Given the tediousness of calculating gains per HMRC §104 rules and marginal tax rates, 0.3% doesn’t seem so bad! :wink:

2 Likes

Hi @KrisG the API is a great addition! I’ve been testing it out and it works well but for certain tickers I get the following error when trying to place a market order.
For example I get this error for both $NBIS and $OKLO tickers.

I’m using the notation NBIS_US_EQ and OKLO_US_EQ as part of the request.

{'type': '/api-errors/entity-not-found', 'title': 'Requested entity not found', 'status': 404, 'detail': 'Ticker does not exist', 'traceId': 'ad14f5756

It works fine for other tickers. eg. TSLA_US_EQ and AMD_US_EQ work fine.

Thanks for any help you can provide!

I don’t think there’s any suggestion that pies will be removed from the platform altogether, only that API support for them is not being developed further (conceivably removed from the API at some future point, hence why I’m asking whether they will at least stay as they are).

Personally, I don’t find them terribly useful beyond tracking allocation and/or grouping securities with a common thesis. I certainly never use them to rebalance nor to add holdings because market orders makes for poor quality execution.

This is great news!

I’ve been building an automation workflow for trading on T212 using make.com platform. I’m stuck in Live environment, due to API limitations to place limit orders, stop loss or other trigger based orders.

Will be following this topic closely to complete this personal project of mine.

Can’t wait to deploy a home built automation workflow using T212 APIs.

Some of us use Google finance functions on Google sheets, to carry out technical analysis or screening. But unfortunately the ticker symbol on Google Finance is different to the one used by T212.

If there was a way to bridge this difference, it would save folks like me some hassle.

The first thing that crosses my mind is to create a conversion table with T212 tickers on one side and Google tickers on the other. Then, in each formula, instead of directly using a T212 ticker, use an XLOOKUP that takes the T212 ticker as input and returns the Google equivalent. As the relation is 1:1, the reverse is also possible.

The equity/metadata/instruments API endpoint gets all information for all stocks that T212 provide access to, and that gives you the ticker and the symbol. I load this once into memory then use that as a lookup table, or you could just create a lookup table from that data in your Google sheets….

1 Like

I do find the Pies endpoint really useful, as I have written a website for myself to display the same data as I see in the web UI for the purposes of tracking the daily, weekly, monthly profit, which I do differently to T212 as they do it in last 24 hours, last 7 days, last 30 days etc. I reset at 1am, Sunday, and 1st of the month respectively.
Also my credits show differently on T212 due to transfer of an existing ISA to T212, so T212 sees the transferred amount as my total credit and uses that to work out profit, which is not actually how much I have physically contributed to fund my ISA.

1 Like

Will try that approach and see if I’m able to replicate my models using T212 metadata alone.

I did think of using some fuzzy logic to tie each Google finance ticker to T212 ticker symbols. But found it a bit difficult and riddled with errors.