¿ªÔÆÌåÓý

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

Re: next valid order id


Nick
 

I think you will be better served by trying to understand how the api is organized rather than fiddling with a sample program and hoping for something that looks like it works.

Use order id's just for orders. Start with the value returned by nextValidId and then add one after each placeorder.

Active ticker id's for each type of request (market data, historical data, etc.)? must be unique.

If you are making multiple requests you will have to keep track of which ticker id's correspond to which requests so that you can process the callbacks properly.

Try to focus on "doing the correct thing" rather than following the sample code without knowing why.

On 7/28/2020 5:45 PM, Joel Gross wrote:
Nick,

Thank you for your very helpful response. The sample Program provided by interactive brokers with the API only has a counter for Order IDs. Am I supposed to create a separate one for Ticker IDs? It seems to me that in all of the samples from interactive brokers, they use the order ID in place of a ticker ID? If I just use the order ID will that cause issues anywhere else in my program as long as I increment it?

Joel

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