Well, your characterization is not correct. The id parameter for callbacks always identifies the message the error relates to:
toggle quoted message
Show quoted text
Between requestIds and orderIds, numeric values for orderIds have to follow strict requirements possibly for very long periods of time (as in forever or until you reset the sequence in TWS/IBGW) while requestIds are ephemeral and can be reused as soon as the last request they have been used for is complete. Therefore, you simple design a numeric assignment strategy for your client that makes sure that, at any point in time, the id value of an error callback can be uniquely related to a recent request or an order. There are may ways you can do that, but a simple approach, that worked well for us for years is this:
Your error callback can uniquely be related to requests or order. ´³¨¹°ù²µ±ð²Ô On Mon, Oct 30, 2023 at 05:19 AM, bespalex wrote: This one thing has almost blown my mind recently, so I guess the 'discovery' may be helpful for others. |