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

前端 未结 2 941
轻奢々
轻奢々 2021-02-04 07:29

In https://www.interactivebrokers.com/en/index.php?f=5041&ns=T it is written that in order to use the IB api you have to connect to it through the TWS or IB Gateway.

2条回答
  •  礼貌的吻别
    2021-02-04 08:17

    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".

提交回复
热议问题