Trading 212 API Available for real money accounts

Hello! Thanks a lot for this new cool feature!

I want to fetch the tickers available on the platform using the instruments endpoint (/api/v0/equity/metadata/instruments).

I seem to only be able to use an API key on my practice account, when creating an API key with me real money account, I get a 401 error.

Do you have an ETA for moving out of beta? :slight_smile:

Thanks!

Hi,
I tried many endpoints with my ApiKey but no result, always 401. I’m quite experienced with APIs and I know how to use the Postman app and such.
Did I miss something? Like, should I crypt the API key with SH265 or anything like that?

Hi @trevordb ,
Make sure you have given your API key permissions for the functionality you want to use. And if you are using Postman, add you API key to the Authorization section → API Key → Value.

Hi, thank you for your reply.
I did everything you mention above.
Here is my basic request on the Trading 212 Platform.
I copied the API key from the mobile app, freshly created.
Here is the result and the authorisations that I gave to the API key on the pic.
I also tried different endpoints such as Account Data, Portfolio etc. All gives 401
I’m wondering if is this because I’m a new user.
I tried on Postman secondarily.
Essentially it should work on the official debug panel here.
Any advice?

(I merged all in one photo due to the forum restrictions.)

Found the solution!
I hope this helps others like me :upside_down_face:
Screenshot 2023-07-25 at 18.32.43

I was in “demo” mode, I didn’t know this was an option menu.
Now I have 200 OK
Thanks

Hi can i implement this within excel using VBA for example.

Can we have FX endpoints?

yes. as you would integrate any other json api. in vba you have a few options but the one I always opt for is the CreateObject(“MSXML2.XMLHTTP”) then just call the endpoint with your key and parse the return

It seems like there is rate-limiting applied to API requests. I’m seeing this after sending approx 30 API requests in the last few hours. I’m using a demo/paper account:

{“code”:“BusinessException”,“context”:{“type”:“TooManyRequests”},“errorMessage”:“too many requests”}

Can someone advise what the limit is, and if there is a way to increase it?

Many thanks

1 Like

Can’t make it work…

curl --location ‘https://live.trading212.com/api/v0/equity/history/orders?cursor=0&ticker=AAPL_US_EQ&limit=20’

Keep getting 500 Internal Server Error with json

{
“code”: “InternalError”
}

in response.

Thank you,
Andrea

Hi, is there a plan to add option to use api for CFD as well ?

Hi, just as many people on here, I’m very grateful for the API, thank you.

My question is about the execution of orders, could we get an update on how far this feature is until release (on non-demo accounts)? or at least how the pipeline looks like? are there many things you are developing before releasing this feature?

Thanks :slight_smile:

Hey everyone, it’s been a while. We are currently not working on the public api. Our priorities have shifted a little bit and we will postpone our fixes and features for this project. We will update you when we have news for you.
Thanks for your understanding!

Thats sad
I was hoping that i could use this API to get market data on instruments that i don’t yet have an open position on.
I guess that is not going to happen

the same…
sadly news