I came across this issue when placing orders rapidly for the same contract/side.
Basically, three orders were placed one after another.
The trade object returned by openOrder had expected order_ids (generated by ib_insync) as 263,264 and 265.
However, the subsequent trade objects were corrupted. The orderStatus, executions for orderid 263 and 264 displayed order.OrderId as 265. However, orderStatus.orderId was captured correctly. So we had a situation where the trade object displayed a different orderId for order and orderStatus.
The attached log has the relevant extracts with timestamp. The last two lines of the log have the erroneous values.
I came across this issue when placing orders rapidly for the same contract/side. Basically, three orders were placed one after another. The trade object returned by openOrder had expected order_ids (generated by ib_insync) as 263,264 and 265. However, the subsequent trade objects were corrupted. The orderStatus, executions for orderid 263 and 264 displayed order.OrderId as 265. However, orderStatus.orderId was captured correctly. So we had a situation where the trade object displayed a different orderId for order and orderStatus.
The attached log has the relevant extracts with timestamp. The last two lines of the log have the erroneous values.
error.log