I actually cancels myself when amending an order via the API and haven't run into an issue....yet but do understand the race condition and actually leave a small pause in-between (not doing HFT here by any means).
What I am actually trying to do though is simulate a delayed fill using the demo account by changing the order from a LIMIT to a MARKET so it gets filled immediately. When I do this in TWS it is filled but there is no orderstatus update triggered in the API.
I wanted to know ?if this is a known limitation or a bug I'm hitting across.