Interactive Brokers API:交易平台(TWS)与IB网关 [英] Interactive Brokers API: Trader Workstation (TWS) vs IB Gateway

查看:1246
本文介绍了Interactive Brokers API:交易平台(TWS)与IB网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://www.interactivebrokers.com/en /index.php?f=5041&ns=T 编写的是,为了使用IB api,您必须通过TWS或IB网关连接到它。

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.


我们的API需要通过交易平台(TWS)或IB网关进行连接。

Our API requires connectivity via Trader Workstation (TWS) or IB Gateway.

什么每个的优势是什么?什么解决方案(Gateway或TWS)提供更好的性能?

What is the advantage of each? What solution (Gateway or TWS) provides a better performance?

推荐答案

网关缺少TWS的GUI,但提供相同的API。

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

IB撰写关于性能的文章:


IB网关为TWS提供了一种低资源替代方案,用于连接到IB交易系统通过API。网关使用的系统资源比TWS少约40%。但是,网关是无GUI的,这意味着您无法在运行TWS时查看API活动。

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:

根据德米特里的TWS API FAQ:


您也可以使用IB Gateway本质上是TWS的条带化版本。与TWS不同,IB Gateway将尝试与IB保持连接超过24小时。无法保证IB网关将连接超过一周,但确实会发生这种情况。

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.

如果不这样做在开发或部署应用程序时需要TWS的完整GUI,请使用网关。它提供相同的API功能,开销更少。

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.

对于所有类型的TWS API相关问题,我建议看一下 IB TWS API Yahoo Group 德米特里的TWS API常见问题解答

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

这篇关于Interactive Brokers API:交易平台(TWS)与IB网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆