Interactive Brokers API: Trader Workstation (TWS) vs IB Gateway

风流意气都作罢 提交于 2019-12-03 00:11:20

The Gateway lacks the GUI of the TWS, but provides the same API.

IB writes about the performance:

The IB Gateway provides a low-resource alternative to TWS for connecting to the IB trading system via the API. The gateway uses approximately 40% fewer system resources than TWS. However, the gateway is GUI-less, which means that you cannot view the API activity as you can when running TWS.

It also has an advantage concerning the automatic logout of TWS:

according to "Dmitry’s TWS API FAQ":

You can also use IB Gateway which is essentially a striped down version of TWS. Unlike TWS, IB Gateway will try to maintain a connection to IB for much longer than 24 hours. There is no guarantee that IB Gateway will keep the connection up for more than a week but this does happen.

If you don't need the full GUI of the TWS while you are developing or while your application is deployed, use the gateway. It provides the same API functionlity with much less overhead.

For all kinds of TWS API related questions I suggest having a look at the IB TWS API Yahoo Group, and "Dmitry’s TWS API FAQ".

This is a reply from IB tech support:

From the API point of view both platforms are identical. The only difference between them is that the TWS has a much richer interface through which you can place orders, view charts, etc. The IB Gateway is just a proxy with a simple interface aimed at providing the most basic features in order to connect via the API.

More important though, the TWS requires to be restarted at least every 24 hours whereas the IB Gateway can run indefinitely.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!