在TWS上已经勾选"Enable ActiveX and Socket EClients" ,端口号也是7496,报错如下,麻烦帮忙看下:
信息通知,代码: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