Afternoon all, sorry if this has been asked before, and I appreciated T212 has stopped working on the API, but does anyone know if itās currently working? Iāve created a new API key and tried on:-
https://t212public-api-docs.redoc.ly/
still receiving a 401 bad api key response.
Am I wasting my time?
Thanks
David
Hello,
Iām playing around with the APIs for the first time.
Using the request report endpoint (api/v0/history/exports), you can trigger a CSV to be generated in your account to download.
Is there a way to retrieve the CSV using the reportID using the API?
If not, then to build a similar view would seem to require multiple API calls (e.g. Order History, Dividends) and collating the results.
Thanks for any guidance
Lummers
Hi @lummers,
Despite the name of the functionality, the REST call returns a JSON. Parsing the JSON yields the content of the CVS.
I am wondering how to determine what the type of an transaction is as the enums to me are not clear. When is it a buy, sell, withdrawal, deposit or dividend payment?
Hope someone is willing to explain
There should be a column called āActionā. It shows whether the action is a Deposit, Market buy, Interest on cash, etc.
Canāt exactly precise when but, between today and yesterday, Iāve been unable to use the API to fetch a Pie by ID.
Even though I can see the ids using the āFetch all piesā endpoint, when I use those ids on the specific āFetch a pieā all the ids are returning āācodeā: āPie not foundāā.
Is there a problem with the API? Did something change?
Are there any talks on supporting CFD and enabling trading outside of practice mode?
Just tried accessing pies by id and it doesnāt work for me either.
I have been using the API to check pies by id for over a year. It has stopped working.
Just wanted to inform that as of this moment Iām now able to get pies by ID again.
Seems that the problem was fixed.
I am trying to fetch all cash deposits, the history/transactions endpoint also returns all the dividends unfortunately. Is it possible to filter out the dividends or just have the transactions (deposit and withdrawals) using the API?
I am not getting all transactions (v0/history/transactions) back compared to whatās in my application I am missing a lot of transactions. I tried with the time and cursor query parameters, both are required. What should be used as cursor as anything I try results in an empty response.
Also encountered something, in the application we see if an order is partially filled with the correct filledQuantity and total. But when I am querying the orders I am not getting those values it is treated as a full order where orderedQuantity: null and filledQuantity: null are returned as null values.
Could you please look into this bug?
Hi All,
I have zero expertise in using APIās, so excuse my noob questions.
Are these types of APIās able to interact with webhooks generated by TradingView alerts? You can see where Iām going with this. Automate/trigger a trade execution from within TV.
Are APIās and webhooks the same or a similar thing dressed up in different language for diifferent levels of user access perhaps?
Oh, and is this the state of play, as I was just (Feb 2025) directed here by T212 tech support, so I assume the Beta is still running:
Thanks for any help anyone can offer. Much appreciated.
CT
Hey, it would be cool if it was possible to update a pieās description through the api endpoints. Would that be possible?
Hey T212 Peeps,
Bumping this in case you hadnāt spotted it.
@Bogi.H
@Momchil.G
@Veselin.V
@George
Another user has stated that T212 has āstopped working on the APIā. Is this correct?
Keep up the great work all.
Regards.
CT
Second that.
It will be nice to know if someone from the Trading212 Team can provide a current status update.
Hi All,
@Momchil.G has replied to my questioning on a separate thread,
https://community.trading212.com/t/realtime-automation-for-s-s-isas/81860
and heās very kindly agreed that can I share his response here:
Cheers.
CT
Hi all,
I generated an API key for the live environment enabling all read-only scopes.
Whatever I do, I always get 401 HTTP code.
Even if I make a simple test with curl I get 401:
curl -X GET "https://demo.trading212.com/api/v0/equity/account/cash" \ [ruby-2.3.1]
-H "Authorization: Bearer XXX"
(where XXX is my API key)
What should I do?
Not at the moment, but weāll keep your suggestion in mind.
No, the API is unable to interact with the mentioned webhooks. Also, placing and executing orders is still supported only for the demo environment.
When it comes to your second question, the answer is also ānoā. They arenāt just dressed up in different language as both serve distinct roles. However, the two often complement each other.
Welcome to the Community, @s2409
I see you mentioned that you generated an API key for the live environment, but the shared data mentions demo. Please try using āhttps://live.trading212.com/api/ā instead and let me know how that goes
Hello, please are there plans to complete the API to be able to place orders ? Now that XTB is shutting down their API this would be an important competitive advantage for T212.