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

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

When making a request to the /api/v0/history/transactions endpoint, Iā€™m unsure which parameters to send in order to get a 200 response?

The API docs describe a cursor string and a limit as the required query parameters, but when I send those I get a 400 response with the message:

Both or none of cursorId and time must be provided

Not sure what should be provided in terms of time.

If I omit the query, I just get a 500 error.

Iā€™m using Python requests, if it makes any differenceā€¦

Thanks in advance for the help!

1 Like

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

1 Like

@braggs not sure if you sorted it out but I generally get errors all over the place. I created a fresh key but did not help.
I was expecting things to work but been a few days that I am getting 401 :frowning:

@minasm nope Iā€™m still getting the same error

1 Like

I have tried end points for placing orders in practice mode. Buy order works. However, I am struggling to understand that how to place sell order. It looks to me that there is no option to differentiate between sell and buy order unless I am missing something.

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:

@manojk005 Try placing order with negative quantity :slight_smile:

@GeorgiL do you have any trick where we get Internal error on listing orders as well please? Been like a week now:(

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!

We will try to find dev resource, in the near future, to at least fix the current known issues. Sorry for the inconvenience

1 Like

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!

Hi, I am new to the whole API thing and was looking for some advice. All I want to do is make a program that sends me the price of a certain ticker at certain times of the day. Which part of the documentation explains how to retrieve this information?

Thank you @GeorgiL

It is disappointing to know that bug fixes are postponed. I had been trying API in last couple of days and able to integrate all APIs. Order execution is temperamental and very often I get error message for all type of orders,

{ā€œcodeā€:ā€œUNDEFINEDā€,ā€œclarificationā€:null}

Hopefully, this get fixed and public API being available for real account.

@GeorgiL I am a dev resource myself :slight_smile: I would love to find a way to help so that weā€™d speed up things :sunglasses: just kidding, I know it does not work that way. I guess Iā€™ll just wait. The only missing piece for me is the Orders endpoint, which somewhat used to work. Iā€™ve added many workaround to overcome the issues Iā€™ve shared. the day I was going to enjoy it, endpoint stopped working :frowning:

@GeorgiL I am also a dev resource and developed C++ library for T212, which works fine for all T212 public APIs. I just wanted to test it further for final phase of T212 integration with my own trading application so that T212 connectivity is on par with other brokerage connected to my application.

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

when trying to issue a request to the API in a webapp in a browser, the CORs preflight request gets a 403 response from the trading212 server
any idea if trading212 would update the settings on their end to handle preflight requests?
or if I must have a proxy server to avoid the issue?
thanks

Given the ease of allocation this API provides us when managing our pies, is it possible to increase number of securities allowed within a pie above 50?