VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 21
声望: 0

code text here

Member
avatar
加入于:
帖子: 21
声望: 0

tws端口号是不是不变,,,客户号就是账号对吗

Member
avatar
加入于:
帖子: 21
声望: 0

信息通知,代码:502,内容: Couldn't connect to TWS. Confirm that "Enable ActiveX and Socket EClients"
is enabled and connection port is the same as "Socket Port" on the
TWS "Edit->Global Configuration...->API->Settings" menu. Live Trading ports:
TWS: 7496; IB Gateway: 4001. Simulated Trading ports for new installations
of version 954.1 or newer: TWS: 7497; IB Gateway: 4002

Member
avatar
加入于:
帖子: 21
声望: 0

已经在tws设置啦还是有这个问题

Administrator
avatar
加入于:
帖子: 4500
声望: 320
  1. 你要先在TWS的setting里面打开API连接才行,具体参就是"Edit->Global Configuration...->API->Settings" menu
  2. 客户号是给多连接用的,每个连接不同就行,一般第一个就1好了
Member
avatar
加入于:
帖子: 21
声望: 0

是按这个步骤来的。。。还是报这个错啊

Administrator
avatar
加入于:
帖子: 4500
声望: 320

如果确定TWS接口已经打开,那么潜在的可能就是你的防火墙或者操作系统防护屏蔽了端口访问,检查看看吧

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】