开云体育

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

Re: 10326 - OCA group revision is not allowed


 

I am glad that worked for you, Max.

Interestingly, just before your post I was able to reproduce? your issue by assigning an OCA group name AND by reusing the original profit taker order.

Apparently, TWS ignores the OCA group name from the initial order, still assigns a generic OCA group to the child orders, and returns Order objects with their generic OCA group names.

  • Everything works just fine if you change the profit taker limit price with the IBKR provided Order object (and their generic OCA group name)
  • But if you use your own order object with your OCA group name (a group that really does not exit and has no orders), Error 10326 "OCA group revision is not allowed." occurs since you technically are trying to change the OCA group the profit taker order belongs to. And that is not allowed. Come to think about it, the error message is actually right on.

And it is very well possible that this behavior was introduced by newer TWS versions. But that validates my approach of:

  • Letting IBKR wrap the child orders of a bracket into an OCA group (as the TWS API documentation code sample suggests)
  • Using IBKR provided Order objects for any order change
闯ü谤驳别苍

?

?

?
On Thu, Mar 13, 2025 at 02:31 PM, Max Payne wrote:

闯ü谤驳别苍,
?
Success! And epiphany #1: when I skip setting ocaGroup (while keeping parentId as in initial order) the problem goes away. The execution engine is once again purring happily!
?
I appreciate your explanation of how you use openOrder(). I do use it (and the other callbacks you list) to track fills, cancellations, cross check positions etc., but it never occurred to me to look beyond .status and .totalQuantity.?
I am going to take a closer look at this as it has clear potential for debugging if nothing else. Some aspects of your PositionController have equivalents in my code, but this is a good opportunity for me to think it through again.
?
Thanks again, this has been most helpful.

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