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

行情订阅失败,找不到合约IC1905
IC: 触发异常已停止
Traceback (most recent call last):
File "d:\VNConda\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 582, in call_strategy_func
func()
File "d:\VNConda\lib\site-packages\vnpy\app\cta_strategy\strategies\turtle_signal_strategy.py", line 51, in on_init
self.load_bar(20)
File "d:\VNConda\lib\site-packages\vnpy\app\cta_strategy\template.py", line 218, in load_bar
self.cta_engine.load_bar(self.vt_symbol, days, interval, callback)
File "d:\VNConda\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 537, in load_bar
data = self.query_bar_from_rq(vt_symbol, interval, start, end)
File "d:\VNConda\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 153, in query_bar_from_rq
symbol, exchange_str = vt_symbol.split(".")
ValueError: not enough values to unpack (expected 2, got 1)

Administrator
avatar
加入于:
帖子: 198
声望: 35

vt_symbol要求填合约品种+交易所,所以报错是“not enough values to unpack (expected 2, got 1)”。
正确的如IC1905.CFFEX

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

okay ,谢谢,搞定

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

1.92的 vt_symbol也要求填合约品种+交易所吗? 反正也 提示找不到合约

Administrator
avatar
加入于:
帖子: 4138
声望: 230

1.9.2版本对于CTP接口来说vt_symbol只要填合约代码就行了

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