New Equity Trading API in Beta - Try it Out in Practice Mode!

Quick notes:

  • We’ve added some history endpoints for dividends and transactions. Orders to come.
  • The position placement endpoints have been separated into specific types since it makes the request schema more concise.
  • Instruments now also return their creation date on the platform so that new instruments can be identified.
3 Likes

I get a empty body by "Fetch all (/api/v0/equity/orders). I get no executed orders and also no pending orders:

Bildschirmfoto 2023-05-02 um 22.19.27

Can you give me your account id?
Again, this endpoint is not historical, and will only give you non-executed orders.

Great, it worked now!

Now, I only missing the name and ISIN of the listed instruments. And the invested amount.

My account id: 15312702

Thanks. Ill look into your case.

As for the ISINs, ou can get them in the instruments endpoint and map your ticker with the instruments ticker after that.

1 Like

In the Instruments Metadata endpoint I get only the very long list of all instruments … I can not query with path parameters for only one specific instrument (not like the Instrument Indicative Pricing endpoint).

Value orders were not supported by the API. They are now properly visualised. However, value order placement or management is still not an option.

About the ISINs. We will not return all the data within all endpoints (graph-approach) since we have a highly normalised system and that would result in a lot of complexity and flimsiness. It’s not impossible but not worth it.
The assumption here is that you have some sort of runtime and properly cache/filter instruments locally.

Can we also get forex prices for converting instrument prices to the portfolio currency?

1 Like

Would be good to have data for all tickers in a watchlist. It can be at the “personal” level, something like:

// get names/ids of all watchlists created by me

https://demo.trading212.com/api/v0/equity/watchlists

// get pricing of all tickers added to a particular watchlist

https://demo.trading212.com/api/v0/equity/watchlists/{watchlistname || watchlistid}

2 Likes

What do you think about the possibility of a parm query of the “Instruments Metadata”? For example with an array parameter for tickers analogous the endpoint for “Instrument Indicative Pricing”?

Are the market price data in Practice mode of same quality as Real mode?

Thank you so much @noop
Let me drop this PHP wrapper here GitHub - minasm/Trading212API: Wrapper for Public Beta Trading212 Official API
Still has work to do :slight_smile: But I will try to keep it up-to-date.

Do we get any notifications if the API gets updated?

1 Like

Our Trading 212 API, previously exclusive to demo users, is now accessible for real money account holders. You can generate multiple tokens with different permission levels for each application or service. Currently, order execution isn’t available, but we plan to enable it soon.

You can create API tokens by visiting your account settings in the platform’s web version. Management in mobile will be available soon.

We value your feedback on the following aspects:

  1. Usability: Is the API intuitive? Can we improve the documentation?
  2. Features: What additional features or data endpoints would you like added?
  3. Performance: Feedback on response time and reliability.
  4. Security: Thoughts on the token permission system and suggestions for enhanced security?

Your feedback will guide improvements for current and future versions. Thank you for participating in this development. We appreciate your input.

17 Likes

First of all, I would like to express my appreciation towards Trading 212 for always implementing new features.

Would it be possible to use this API with yahoo finance to auto update our portfolio?

1 Like

Hello,

Great news that the API is now available for real money accounts!!

I still have some questions:

1.) How can I get the real ticker of a instrument:

For “Rocket Lab USA” with the real ticker “RKLB” I get this ticker:
Bildschirmfoto 2023-05-19 um 13.12.22

For “Airbus” with the real ticker “AIR” I get this ticker:
Bildschirmfoto 2023-05-19 um 13.15.05

2.) How can I get the exchange rate for stocks in foreign currency? Must I use extern sources?

3.) How can I get the invested value about a stock? Based only on subtracting the profit/loss from the current market value?

  1. You cannot. We are not using the exchange ticker to execute orders and therefore only have our internal reference ticker to expose.
  2. Market data is unfortunately something that is very costly to redistribute and we aim to keep this free as this is our mantra.
  3. Quantity * AveragePrice will get you there.
2 Likes

Thanks looking good ! is there a roadmap to add the ability to manage pots ? i.e. rebalance, add ticket etc. that would be excellent.

We will expand the API in the following weeks. And yes, pies are in the pipeline.

2 Likes