code text here
code text here
tws端口号是不是不变,,,客户号就是账号对吗
信息通知,代码: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
已经在tws设置啦还是有这个问题
是按这个步骤来的。。。还是报这个错啊
如果确定TWS接口已经打开,那么潜在的可能就是你的防火墙或者操作系统防护屏蔽了端口访问,检查看看吧