vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 15
声望: 0

Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\trader\ui\widget.py", line 792, in set_vt_symbol
self.main_engine.subscribe(req, gateway_name)
File "D:\vnstudio\lib\site-packages\vnpy\trader\engine.py", line 165, in subscribe
gateway.subscribe(req)
File "D:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 165, in subscribe
self.api.subscribe(req)
File "D:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 621, in subscribe
self.client.reqContractDetails(self.reqid, ib_contract)
File "D:\vnstudio\lib\site-packages\ibapi\client.py", line 1966, in reqContractDetails
self.sendMsg(msg)
File "D:\vnstudio\lib\site-packages\ibapi\client.py", line 78, in sendMsg
self.conn.sendMsg(full_msg)
File "D:\vnstudio\lib\site-packages\ibapi\connection.py", line 80, in sendMsg
nSent = self.socket.send(msg)
ConnectionAbortedError: [WinError 10053] 您的主机中的软件中止了一个已建立的连接。

Administrator
avatar
加入于:
帖子: 2575
声望: 109

请检查是否已经启动了TWS,并连接了IbGateway

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

time,msg,gateway_name
16:47:15.711,"信息通知,代码:320,内容: Error reading request:Message id 1. Unable to parse data. java.lang.NumberFormatException: For input string: ""XAUUSD""",IB
16:45:39.235,服务器时间: 2019-11-25 16:45:37.000000,IB
16:45:39.220,IB TWS连接成功,IB

连接没问题,一旦输入代码,报错,然后连接自动断开

Member
加入于:
帖子: 113
声望: 26

应该是symbol 代码填错了,vnpy用的都是数字
可以试试12087792,交易所IDEALPRO

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

我更换了操作系统2012, 更换了TWS 和IB gateway ,依然报错!
程序是最新版本

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

谢谢!问题解决了

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