开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Question on nextValidId function


 

Hi All,

one question on the orderId and the necessity of nextValidId function. From the documentation () it is stated that “if there are multiple client applications connected to one account, it is necessary to use an order ID with new orders which is greater than all previous order IDs returned to the client application in openOrder or orderStatus callbacks?”. so I expect that the nextValidId function is needed in case of multiple clients for one account. However i have created a program in python that handles orderIds internally without relying on the nextvalidid function. By launching multiple instances of it (each with different client id) I see no problems in handling orders (each client autonomously updating its orderId). What am I missing? Is nextValidId really needed?

thanks,

Marco

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