QQ for everybody since OP is using IB API which is notoriously bad that many wrappers have been written for it (ib-insync).
This is a general question, I'm wondering is there any good framework/wrappers out there that one can learn from to code up a complex trading application?
Like dealing with all the asynchronous nature of process/submitting trading and quotes messages.