It will be useful if âNet Depositsâ value can be added to /api/v0/equity/account/summary endpoint. Currently, its a tricky call to the transactions endpoint and compute it on the go.
Hi,
I tried to read all my past transactions
It works for the first 2 pages, then the returned nextPagePath seems itâs broken:
404 Not Found: â{âtypeâ:â/api-errors/entity-not-found",âtitleâ:âRequested entity not foundâ,âstatusâ:404,âdetailâ:âTransaction with id (uuid) not found.â,âtraceIdâ:â****â}"
Quick update: You can now place Limit, Stop, and Stop Limit orders via the API on real-money accounts. This change is already live for everyone. The public documentation is currently being regenerated and will be updated shortly.
This is good news
. Do you have any plans to update so multi-currency is also supported?
For now, orders can only be placed using your main account currency. Weâll let you know if multi-currency support becomes available in the future.
Excellent news. I had to get new authorisation keys to make this work. I have successfully cancelled an existing order and set up a new limit order in my ISA account. This didnât work yesterday but now it works well!
Thanks for your efforts. This is such a simple to use API compared to other APIâs I have used in the past, for that alone the programmers should be commended! .
I have a share quantity of 5.59032128 shares ( I assume this has happened because I had purchased by value).
Using the API:
I tried to sell all the shares and got a error returned âinvalid quantity precision 4â.
I tried to sell 5.59 shares with the hope that T212 would sensibly sell the lot and I got a message âmust have opened position at least 1.00â.
How can I sell these shares using the API?
Yes, itâs caused by ordering by value, which I did at the very beginning and before I knew any better. It didnât take me long to also work out that every order by value (ie via pies) is a market order, so I switched to limit orders and manual importing into the appropriate pie.
That still left me with some equities with annoying share quantities to 8-decimal places. Iâm sufficiently OCD that this drove me crazy. I donât know whether this will work via the API because API pie end-points are deprecated anyway, but the solution I found was:
- export 100% of the problem security from its pie, if not already outside of a pie;
- then import it back into its pie (create one if necessary);
- the second modal asks what quantity you want to import. The slider will not give you a round number, but you can click on the number of shares (it takes a little precision) and then enter a sensible number.
- the rounding error remains still outside of the pie. You can do a market sell, for example, on 100% of that rounding error because you canât directly sell a security that is in a pie.
It would be great if there was a way to tell which of the stocks are buyable and sellable on CFD from the list of instruments on API.
Here in the list of all the instruments Get all available instruments you could just add two (or more) fields to tell, whether the instrument is present on CFD and also whether itâs also shortable i.e. Remaining Sell Quantity is above 0. Or just add 2 fields for remaining buy and sell quantities.
Because a lot of times I get a signal with a list of stocks that look good for shorting, but maybe one out of 5 is able to be actually shorted and itâs a pain to check every stock manually.
Thank you! This was a much-needed implementation! Iâm lucky this functionality was added just before I started looking to use the API to place orders.
It could be argued that T212 has an active incentive not to do that because theyâre the counterparty to any CFD trade.
I had a look at the list of available trading instruments (which doesnât require being logged in), but it only tells you the buy limit, not the sell limit. If the buy limit were sufficient, you could find the public, non-API endpoint that provides those data as JSON (I did). Not terribly difficult to do, but the URL has a long random string in it, and finding where that string comes from might be a little more challenging.
The only other alternative that comes to mind is a Selenium-based solution that relies on being logged in. If you are tempted to do that, be sure to check the Terms of Service permit such activity, or your account could be suspended.
No, Iâm specifically after the sell quantity. And yes I know of the endpoint you are talking about.
@Veselin.V Can we also place delete/cancel orders via the API already?
Thanks.
Are market orders currently the only order type that support extended hours trading through the API? I tried sending a limit order through during extended hours and the order remains pending, and only market orders seem to support the extendedHours boolean option in the body of the request as per the API.
As market orders are especially dangerous during extended hours due to larger spreads, it would be hugely beneficial if we could enable extended hours for limit orders (and stop orders) sent to the API. That way, we would have the full functionality that the app provides. Thank you!
@KevinLevin, itâs possible to cancel orders via the API.
@TradingWiz, аt the moment, only market orders are supported for Extended Hours Trading.
Iâm trying to imput my API and Secret key into GetQuin but it keeps saying the key is invalid. Iâve tried this 2 or 3 times with the same result. The help page on GetQuin says that it only works with App Version 2.196.1
I donât know if this is T212 or GetQuin. Both are on my desktop in a browser.
Any suggestions
Any update on get transactions (api/v0/equity/history/transactions) ?
First page and 2nd page work using nextPagePath returned by nthe API, but starting with 3rd page it fails if I follow nextPagePath.
{
"type": "/api-errors/entity-not-found",
"title": "Requested entity not found",
"status": 404,
"detail": "Transaction with id ***** not found.",
"traceId": "******"
}
Would be extremely useful to have an API functionality where we can specify the buying currency for orders sent in, as well as the currency we wish to receive sell proceeds in. Currently, there is only an option for buying with default currency, and receiving amounts in default as well. For a strategy that consistently buys US stocks from Europe, this accrues unsustainable FX conversion costs.
Currently, there is no support for submitting API requests for buy/sell order types except for Market orders.
The response returned is shown below when attempting to supply âextendedHours":True into the payload to the endpoint:/api/v0/equity/orders/limit
{âtypeâ: â/api-errors/invalid-requestâ, âtitleâ: âThe request is invalidâ, âstatusâ: 400, âdetailâ: âInvalid payloadâ, âtraceIdâ: âxxxxxxxâ}
Please add support for accepting extendedHours for other order types just as you do for Market orders.
@longnightsanddays Our current focus is on other priorities, but Iâll pass along your suggestion. If additional order types become available for EHT trading, weâll let you know.