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

Hey everyone,
Exciting news! We’ve just rolled out a beta version of our trading API, and we’d love for you to try it out. For now, it’s only available for INVEST accounts in PRACTICE mode.
Here’s how to get started:

  1. Obtain your API key: Log in to the web platform, head to your Invest account, switch to practice mode, go to “Settings”, scroll down (bellow “Themes”) and click on the “API (beta) menu.
  2. Explore the API documentation: https://t212public-api-docs.redoc.ly

Please note that the API is currently missing some functionality, but we’ll be working quickly to add more features.
Give it a spin, and let us know what you think! Your feedback will help us make improvements before the full release. If you have any questions or suggestions, feel free to post here.

Happy experimenting!

20 Likes

That is wonderful news!

Amazing!

I’m trying it out right now using the Node code snippet and it doesn’t work, giving an HTML response with “Access Denied, You do not have access to trading212.com […]”. I tested with cURL and it worked, so I then tried adding an User-Agent to my Node call and it then worked :slight_smile:

image

Already an improvement for the documentation.

1 Like

Thanks for the report.

We will drop this as a requirement from our firewalls. APIs shouldn’t require user-agent.

1 Like

Approximately when could the real version be made available

1 Like

When we iron out the release. We don’t want to make revisions to the API and change endpoints once we launch a stable release.

And we would love to hear your thoughts about what is missing that you consider vital to a launch.

We didn’t want to develop it in the shadows and wanted to involve as many people as we can to give us feedback.

4 Likes

I think besides order management (create/edit/cancel/status orders), portfolio summary (holdings, cash balance), the mainly missing feature would be history data (transactions/dividend/cash TX history).

This would allow to integrate to any external/homemade portfolio tracking solution.

3 Likes

It would be great to be able to manage our pies. Retrieve the holdings in them, remove, add or change their weights. Also investing in them (specifically in the auto rebalancing mode :crossed_fingers:).

1 Like

Budgeting app integrations portfolio value, transaction history, dividens would be great to add. Possibly also isa utilisation

@noop That’s really GREAT NEWS!!!

I’m very excited about this upcoming feature!!!

By the response for “Fetch all open positions” I miss in the name of the instruments.

Also helpful are getting the ISIN of the instruments.

The invested amount can only be calculated or is there also data for this?

Is the API for personal usage only or can it be used to create apps around it?

2 Likes

I get no open orders with “Orders - Fetch all” (/api/v0/equity/orders). Open orders should also be possible to get.

the copy paste function for the api key does not work ?

i am getting 401 response bad api key ?

Very nice to see that this is in the works!

I get a 500 though on GET https://demo.trading212.com/api/v0/equity/portfolio, the rest of the endpoints seem to work :slight_smile:

I get no instruments list of my portfolio. Only a error message:

I get no orders:

Is it worth a trading API section with say a quick start guide and some other stuff?

1 Like

the /orders endpoint does not return positions, just orders.

As for your issue with the /portfolio endpoint - it was a corner case that has been dealt with. You can give it another go.

Thanks for the feedback. We will soon release an initial version of the reporting endpoints.

1 Like