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.
Yeah, I ended up taking https://github.com/gofinance/ib and rewrote my own wrapper. This took a long time but has been stable since. I'm basically only doing buy lmt, sell lmt, cancel, and updates orders though. So, the logic is pretty simple. Catching all the return messages and structuring them correctly took tons of debugging, trail, and error. Basically, mapping the messages into the correct orders for state tracking.
I use ib-insync with asyncio and it is surprisingly easy, the most difficult is order management. Jason Brownlee’s SuperFastPython was the most approachable asyncio explanation I found.
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.