IMHO this is hardly possible unless you're ready to rewrite the api itself. Anyway 10-20 trades per minute is not much. What's your current time per "a trading logic cycle"? I now have around 50ms per check if no transaction is triggered, or around 150ms if there is a trade triggered. Which is enough to make 5-6 trades per second, and should be definitely enough to make the same in a minute. Review your code for holes, especially paying attention where and how you process incoming messages. The correct approach seems to be "unload first, process later", as trying to process messages within callback functions hold the queue, so I would keep that to the bare minimum.