Need help with threading in function (ibapi)

I’m not an expert on threading, but I suspect you need to do something like this example:

Best,
Randy