Skip to content

[trade executer] market orders #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SeverinJB opened this issue Jun 6, 2020 · 0 comments
Open

[trade executer] market orders #14

SeverinJB opened this issue Jun 6, 2020 · 0 comments

Comments

@SeverinJB
Copy link
Owner

SeverinJB commented Jun 6, 2020

POST https://demo.trading212.com/rest/v2/trading/open-positions
with {"notify":"NONE","targetPrice":239.74,"quantity":0.1,"instrumentCode":"ETHUSD"}

If price has changed while executing market order, T212 response is Status Code: 500 and:
{"code":"BusinessException","context":{"current":241.87,"code":"ETHUSD","type":"PriceChangedException","currentPriceBuy":241.52,"operation":"buy","currentPriceSell":241.87,"target":239.74},"message":"PriceChangedException"}

Resending the POST request with an updated target price seems required.

@SeverinJB SeverinJB added this to the T212 integration milestone Jun 6, 2020
@SeverinJB SeverinJB changed the title [t212 – trade executer] market orders [trade executer] market orders Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant