IB API : Excel ‘103 Duplicate order id’ error

After having operated successfully with the TwsDde.xls, I have problems with it now. I am not able to send orders from the spreadsheet: the error is ‘103 Duplicate order id’.
The environment is: IB API 9.62, MS Excel 2003, Windows XP

I read somewhere that when sending an order via the spreadsheet the tws applet reads from a database the highest id number from the last activity and ignores any orders with id numbers lower than this as ‘possible duplicates’.

Do you know where/how to get this last id number or how to fix this error?
 
Depending on your tws version, there should a "reset API order id sequence" button in tws, "configure", "API", "all API settings"...

Otherwise, go to the jts folder in C:, open dglfh...vv or dglfh..vn folders( I don't remember which one it is), open Tws.xml and search for "ddeidmap" in that document. There will a number , reset it to 0.
 
Back
Top