我正在使用 IB 网关连接到 tws,使用来自https://gist.github.com/valiant-falstaff/4093998b625d76ef4afe的 IbPy 示例 Python 2.7 代码会产生以下错误:
Server Error: <error id=-1, errorCode=502, errorMsg=Couldn't connect to TWS.
Confirm that "Enable ActiveX and Socket Clients" is enabled on the TWS
"Configure->API" menu.>
Server Response: error, <error id=-1, errorCode=502, errorMsg=Couldn't
connect to TWS. Confirm that "Enable ActiveX and Socket Clients" is enabled
on the TWS "Configure->API" menu.>
Server Error: <error id=-1, errorCode=504, errorMsg=Not connected>
Server Response: error, <error id=-1, errorCode=504, errorMsg=Not connected>
但是,我没有在我找到的所有示例中显示的网关 GUI 中选择“启用 ActiveX 和套接字客户端”的选项。这就是“标准”设置窗口的样子。这就是我的设置窗口的样子
。有人知道我该如何解决这个问题吗?