Jump to content
Cinemizer

How to get info about terminated trade ID

Recommended Posts

Hi,

If I place a trade with an order ID with stop loss and take profit prices on UK CFD market, after reaching one of the triggers and terminating the Order ID, how can I get information about
on which price and by which trigger (S/L or T/P) was terminated ?

I mean, if stop loss or take profit price was reached, the ID disappear from my positions list and I want to know, on which price and by which trigger was it terminated.

THX !

Share this post


Link to post

Hello,

Subscribe to the Orders stream, which will provide an update / information on any orders as soon as they are filled / cancelled etc. 

Kind Regards, PM

Share this post


Link to post

Hi,

It is a good idea to solve it with stream, but how can I get the info about, on which price a trade was sold, if I want to make it with http POST or GET ?

THX !

Share this post


Link to post

I mean, is there a http POST or GET request, calling with a specific Order ID and it returns the profit/loss value if the Order ID was executed or telling, on which price it was executed ?

THX !

Share this post


Link to post

Hello,

You can use a ListTradeHistory call, as this returns orders with a status of (3 - Open, 9 - Closed), and includes orders that were a trade / stop / limit order.

The returned results include a RealisedPnL field, and also the price at which the order was executed.

Kind Regards, PM

Share this post


Link to post

Hi,

If I use the ListTradeHistory call, the last trades infos are coming, but I do not know, which original OrderID was executed.

If I place a trade or an order, I get back the trade OrdeID or the StopLoss/TakeProfit OrderID of an order, but if one of them will be executed, it means, i.e. a buy trade will be sold,
in the answer of ListTradeHistory I get back different OrderID, not the same, which was sent me, as I placed the trade or the stop/limit order.
How can I know, which original OrderID was executed, if a trade was executed, with a new, not known OrderID?

THX !

Share this post


Link to post

Hello,

In this case, then the only way is to subscribe to the Order stream and listen for updates to your orders. This will definitively inform you which order has triggered.

Kind Regards, PM

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×