CONFIRMS OPU WOU

10 posts / 0 new
Last post
anil.bhatia
CONFIRMS OPU WOU

I am trying to understand how the CONFIRMS OPU and WOU work.

Via IG web demo I create an order and I would expect to receive via the stream a WOU event, but I receive an OPU event which based on the documentation is for open positions, which an order is not. The same happens when I close a pending order.

Is there an issue here or is my understanding incorrect?

lordvee
hey,

hey,
my understanding is that wou is for working orders that have not yet been executed, wherease opu is for open positions. i have not tested it thoroughly so pls correct me if i am wrong.

The issues i have is subscribe to market and account at the same time: i cannot seem to be able to make it work. anybody succeeeding?

anil.bhatia
Yes, that is what I said. If

Yes, that is what I said. If I create a working order I expect a WOU event, but I am receiving a OPU event which I believe is wrong.

newbie99
WOU

That sounds incorrect (as in I agree with your logic, I would expect a WOU event in that scenario too).

Out of curiosity, is this the query string you're using?

{'LS_session': 'xxxxx', 'LS_op': 'add', 'LS_table': '1', 'LS_id': 'TRADE:XXXXX', 'LS_schema': 'OPU', 'LS_mode': 'DISTINCT'}

newbie99
WOU

That sounds incorrect (as in I agree with your logic, I would expect a WOU event in that scenario too).

Out of curiosity, is this the query string you're using?

{'LS_session': 'xxxxx', 'LS_op': 'add', 'LS_table': '1', 'LS_id': 'TRADE:XXXXX', 'LS_schema': 'OPU', 'LS_mode': 'DISTINCT'}

newbie99
(or WOU in place of OPU of

(or WOU in place of OPU of course)

newbie99
(or WOU in place of OPU of

(or WOU in place of OPU of course)

anil.bhatia
You say you can not make it

You say you can not make it work properly, what issue are you experiencing?

newbie99
Not sure why its duplicate

Not sure why its duplicate posting...but I get the same as you, open orders show as OPU not WOU.

This thread here, suggests that might be correct behaviour for non-limit orders:

https://labs.ig.com/node/147

But from what I see, even on a limit order it still sends an OPU not a WOU (not sure if you get the same)?

Konstantin
Greetings!

Greetings!

I have similar problems on my account. I am placing working orders and always have empty WOU messages, like "3,1|", where JSON data is expected to be after "|" separator. At the same time, CONFIRMS and OPU messages are empty from time to time, like "1,1|", as well as "2,1|#", i.e. sometimes it is only "#" symbol instead of JSON data.

Looking to other messages I have from CONFIRMS and OPU subscriptions, it is not enough data to determine, if working order has been actually executed or not ("status" and "dealStatus" fields are expected to point to that, while they are not).

Example:
Order 1 - has not been executed
{ "dealReference": "2440181408", "direction": "SELL", "epic": "CS.D.GBPAUD.CFD.IP", "expiry": "-", "currencyCode": "AUD", "forceOpen" : true, "guaranteedStop" : false, "level" : "01.79847", "type" : "LIMIT", "size" : 1, "timeInForce" : "GOOD_TILL_CANCELLED" }

messages we had related to it:
[2020-07-17 05:56:24.937650] [debug] [CON]: 1,1|{"direction":"SELL","epic":"CS.D.GBPAUD.CFD.IP","stopLevel":null,"limitLevel":null,"dealReference":"2440181408","dealId":"DIAAAAD4KPGBWAJ","limitDistance":null,"stopDistance":null,"expiry":"-","affectedDeals":[{"dealId":"DIAAAAD4KPGBWAJ","status":"OPENED"}],"dealStatus":"ACCEPTED","guaranteedStop":false,"trailingStop":false,"level":1.79847,"reason":"SUCCESS","status":"OPEN","size":1,"profit":null,"profitCurrency":null,"date":"2020-07-17T05:56:24.72","channel":"PublicRestOTC"}
[2020-07-17 05:56:25.973425] [debug] [OPU]: 2,1|{"dealReference":"2440181408","dealId":"DIAAAAD4KPGBWAJ","direction":"SELL","epic":"CS.D.GBPAUD.CFD.IP","status":"OPEN","dealStatus":"ACCEPTED","level":1.79847,"size":1,"timestamp":"2020-07-17T05:56:24.000","channel":"PublicRestOTC","expiry":"-","currency":"AUD","stopDistance":null,"limitDistance":null,"guaranteedStop":false,"orderType":"LIMIT","timeInForce":"GOOD_TILL_CANCELLED","goodTillDate":null}
[2020-07-17 05:56:27.623316] [debug] [CON]: 1,1|{"direction":"SELL","epic":"CS.D.GBPAUD.CFD.IP","stopLevel":null,"limitLevel":null,"dealReference":"2440181408","dealId":"DIAAAAD4KPGBWAJ","limitDistance":null,"stopDistance":null,"expiry":"-","affectedDeals":[{"dealId":"DIAAAAD4KPGBWAJ","status":"DELETED"}],"dealStatus":"ACCEPTED","guaranteedStop":false,"trailingStop":false,"level":17984.7,"reason":"SUCCESS","status":"DELETED","size":1,"profit":null,"profitCurrency":null,"date":"2020-07-17T05:56:26.032","channel":"PublicRestOTC"}
[2020-07-17 05:56:27.623409] [debug] [OPU]: 2,1|{"dealReference":"2440181408","dealId":"DIAAAAD4KPGBWAJ","direction":"SELL","epic":"CS.D.GBPAUD.CFD.IP","status":"DELETED","dealStatus":"ACCEPTED","level":1.79847,"size":1,"timestamp":"2020-07-17T05:56:26.026","channel":"PublicRestOTC","expiry":"-","currency":"AUD","stopDistance":null,"limitDistance":null,"guaranteedStop":false,"orderType":"LIMIT","timeInForce":"GOOD_TILL_CANCELLED","goodTillDate":null}

Order 2 - has been executed
{ "dealReference": "SL_2440181394_7Py", "direction": "BUY", "epic": "CS.D.AUDJPY.CFD.IP", "expiry": "-", "currencyCode": "JPY", "forceOpen" : false, "guaranteedStop" : false, "level" : "0074.888", "type" : "LIMIT", "size" : 1, "timeInForce" : "GOOD_TILL_CANCELLED" }

messages we had related to it:
[CON]: 1,1|{"direction":"BUY","epic":"CS.D.AUDJPY.CFD.IP","stopLevel":null,"limitLevel":null,"dealReference":"SL_2440181394_7Py","dealId":"DIAAAAD4KPR3DA3","limitDistance":null,"stopDistance":null,"expiry":"-","affectedDeals":[{"dealId":"DIAAAAD4KPR3DA3","status":"OPENED"}],"dealStatus":"ACCEPTED","guaranteedStop":false,"trailingStop":false,"level":74.888,"reason":"SUCCESS","status":"OPEN","size":1,"profit":null,"profitCurrency":null,"date":"2020-07-17T06:00:52.855","channel":"PublicRestOTC"}
[2020-07-17 06:00:53.050181] [debug] [OPU]:
2,1|{"dealReference":"SL_2440181394_7Py","dealId":"DIAAAAD4KPR3DA3","direction":"BUY","epic":"CS.D.AUDJPY.CFD.IP","status":"OPEN","dealStatus":"ACCEPTED","level":74.888,"size":1,"timestamp":"2020-07-17T06:00:52.000","channel":"PublicRestOTC","expiry":"-","currency":"JPY","stopDistance":null,"limitDistance":null,"guaranteedStop":false,"orderType":"LIMIT","timeInForce":"GOOD_TILL_CANCELLED","goodTillDate":null}
[2020-07-17 06:00:53.050217] [debug] [OPU]: 2,1|{"dealReference":"SL_2440181394_7Py","dealId":"DIAAAAD4KPR3DA3","direction":"BUY","epic":"CS.D.AUDJPY.CFD.IP","status":"DELETED","dealStatus":"ACCEPTED","level":74.888,"size":1,"timestamp":"2020-07-17T06:00:52.878","channel":"PublicRestOTC","expiry":"-","currency":"JPY","stopDistance":null,"limitDistance":null,"guaranteedStop":false,"orderType":"LIMIT","timeInForce":"GOOD_TILL_CANCELLED","goodTillDate":null}

if we look at statuses briefly:

Order1 (type - dealStatus - status) - canceled in result
CONFIRMS - ACCEPTED - OPEN
OPU - ACCEPTED - OPEN
CONFIRMS - ACCEPTED - DELETED
OPU - ACCEPTED - DELETED

Order 2 (type - dealStatus - status) - executed in result
CONFIRMS - ACCEPTED - OPEN
OPU - ACCEPTED - OPEN
OPU - ACCEPTED - DELETED

So I am completely confused, if this API is workable solution at all, or I am just have some issue with messages for my account.

Log in or register to post comments