Trading 212 API Update šŸ› ļø

yes. because you’ll see both the transaction that creates the event and you’ll see the net position in your portfolio overview change

Since writing this it appears to have been fixed, as of this weekend, the ā€œtotalā€ field matches my Value in the website.

I would not be surprised if they never do, because it looks like they never fixed it for their own app. I’d even go so far as to suggest that they can’t.

Their app web based app, at least, stores a look-up table called cashtagsV2 (IIRC) (or it might be the one beginning or ending with ā€˜diff’) in LocalStorage that looked like it contains a translation table for symbols that have been renamed for whatever reason.

It’s just JSON so perhaps you could look at that and see if it would provide the fix you need.

That’s a serious shortcoming, IMO, which I hope is rectified soon. I never use market orders in the ordinary course of trading.

Does anyone know how to access the api key/secret for ISA accounts? The option appears not to exist in the settings menu for ISA but the docs clearly state it should be available for Stocks ISA accounts as well as Invest (where I have it working). Am I missing something here?

In any case I’m enjoying this so far for some experiments on how to best manage my account. I’m just looking at how I can use it more widely.

I will also add my name to the ring for asking for more order types than just Market as we currently have. I’m sure it’s on its way but worth adding another voice to this.

Awesome to see progress on the API! I notice the new docs pages doesn’t mention the old Pie endpoints? Have these been removed from the api or is this a mistake on the new

The Pie endpoints are set to be deprecated and will no longer receive updates. We’ll update the docs to clearly mark these as ā€œdeprecated.ā€

1 Like

Why? The Pie features are incredibly useful/

3 Likes

Hi! Loving the API so far but im wondering if we will get limit orders in Live anytime soon? I have an algo I want to implement but it requires placing limit orders so best I can do right now is doing market orders when the price hits the mark

1 Like

Hi all,

Noticed in the new docs there is no mention of creating a pie programmatically.

But in the old docs the API endpoint is still there.

Is this behaviour still support?

New docs: General Information
Old docs: Trading212 Public API Docs

Can we request to ā€˜un-deprecate’ the Pie endpoints?

They are extremely useful and would love to see them in the production api release.

2 Likes

Do you have any information when bug with ā€œcursorā€œ will be fixed for /api/v0/equity/history/orders?cursor=***&ticker=&limit=50 endpoint? I have a case when 8 months of orders history are missed. I use always nextPagePath params to get data for the next page.

1 Like

You can check today. I see that in the last weekend was a huge change in this endpoint.

Same bug than before and also the same solution applies

There are a couple of features that would be helpful for the API.

  1. Could you build an ā€œauto-rebalanceā€ endpoint? Similar to the ā€œrebalanceā€ button within the GUI.
  2. Could you build an end-point for ā€œpie transactionsā€ so I am able to easily view all transactions within only the scope of a pie?

At the end of the day I am conducting strategies which I’ll want to audit and apply proper risk management which is a slight limitation with the T212 API for Pies at the moment.

Google sheets unable to pull through past dividend payments, just returns a blank. Gemini has checked it and thinks it is an API error by T212. Any ideas?

Another vote for keeping/upgrading the PIE functionality via the API.
Pies are unique for the platform and should not be cut out from the API.

2 Likes

Will there be new APIs related to pies?

1 Like

Hi Veselin,

I’ve just begun to write some code for T212’s API and I’ve just realised that I need to clarify one point on the deprecation of pies: will the endpoints GET /equity/pies and GET /equity/pies/{id} be retained, at the least, or are you planning to retire pies from the platform altogether?

I think I can guess at why other pie-related functions might be deprecated, but those two endpoints are the only way to programmatically find what instruments have been grouped together and what their target and actual allocations are.

If those endpoints are going to go away altogether at some point, it would be really useful to know that now so we can figure out another way to achieve those same ends before things break unexpectedly.

Thanks, S.

2 Likes