¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: conflicting orderStatus messages


 

From my perspective what you describe look strange.
It is unclear to me if you experience this while using TWS manually or trough a section of code. I assume trough coding then I would look at your code logic first.

1- you can expect to receive a ::openOrder call back as the first call back once you have submitted your order.

"Immediately after the order was submitted correctly, the TWS will start sending events concerning the order's activity via and "

With status "PreSubmitted" maybe but it should be called.
This look like an acknowledgment of an (but nowhere does IB doc write this explicitly, look like an implicit)
Practically I also always get at least one? ::orderstatus call back just after the::openOrder call back and before any execDetails

2- The execDetails call back happens later(at least for me).
As the name imply it, it is sent only once the order had been fulfilled at least in part.

3- The error message you report give the impression that you re-submit an order using the already used orderid 97536 and expired (bcs executed)
Luckily for you as the order had been filled, you cannot re-use same orderid, as re-using it ought to be interpreted as request to change something in the order, but as it was already filled up, nothing now can be changed, then the extra order is rejected.

Assuming the datetime reported does reveal the sequence of events, the 'Cancelled' status did apply to the re-submitted order.
try to log on your own any call to placeOrder, including the orderid you used

Join [email protected] to automatically receive all group messages.