TWS or the gateway does NOT provide the API. IB implemented and offers an API. The API by IB's requirement must connect to TWS or the gateway and TWS and the gateway in turn maintain IB server connectivity. How the gateway is managed, via Gui interface or headless doesn't change the routing logic UNLESS IB makes significant changes to the API and makes the gateway obsolete. With all due respect and acknowledgement of your work but I only see some edge cases where this might be useful. The time it takes to configure your gateway, set the ports right, copy the ini files will be as much if not longer than simply installing the gateway on whatever host you want it to run. Who cares it has an additional gui layer or not. It exposes the same functionality in the end. Changing ports and dealing with network issues can make working with dockers a total nightmare from my experience. Why making installing the IB gateway, setting the port, and being ready to run more complicated? Now if IB made the gateway obsolete and redesigned its API to directly connect to its servers that would be a real game changer.