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?

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}

1 Like

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

With the release of the new API, I am assuming there will be functionality to programmatically send orders.

I think a good idea would be to implement a way to create sub accounts to separate funds/ trades.

This would be similar to how pies work. It would be within your current account.

backend: Just label certain trades/ orders with a specific tag and keep track of funds.
frontend: Just filter the displayed funds/ trades for the tag.

This would be beneficial for anyone trying multiple strategies via a system/ algo strategy while also using a discretionary approach.

Sounds dead simple. Can’t believe nobody’s doing it.
/s

1 Like

I mean you can be /s all you want.

From an engineering standpoint you can do it pretty much all via conditional UI rendering with some slight tweaks on the backend for a “sub account” uuid.

It doesn’t change the main functionality of the product or create a new user, just what is displayed for each sub account uuid.

But hey… /s

1 Like

I was in the right mood, forgot that this isn’t Reddit and people get offended.

Sorry son. Thought that your solution may involve changes in their database structure, but I’m not much of an engineer myself.

Cheers

1 Like

First of all, big kudos for developing this. What would be great, is ability to make a “Fill or Kill” limit order. Also, fetching the last price for the given ticker (if this functionality doesn’t already exist)

1 Like