¿ªÔÆÌåÓý

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

Re: Duplicate OrderID


 

¿ªÔÆÌåÓý

First of all this is really weird case. I never seen this type of issue.

Are you waiting for next valid order id event before starting with other things?

?

But if you really want to Hack it then use Different Client ID every day, so that they can never collide for a week.

?

From: [email protected] <[email protected]> On Behalf Of bespalex
Sent: Wednesday, November 29, 2023 12:02 AM
To: [email protected]
Subject: [TWS API] Duplicate OrderID

?

IB doesn't cease to amuse. I am baffled.
Yesterday, the last executed orderId was 161178.
Today,??ibapi.wrapper: ANSWER nextValidId {'orderId': 161044}
No need to say, this caused a major headache today, as orderIds eventually started to coincide with already executed yesterday's ones that are still in my open position.
How is this possible? What can be done to prevent this?

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