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

如图所示,已通过直达api订阅到XINA50股指的CN2006合约,数据库无数据,直接实盘提示行情订阅失败,找不到合约CN2006,该如何解决外盘实盘时的此类报错呢?望解答

报错代码:

CN2006: 触发异常已停止
Traceback (most recent call last):
  File "C:\Users\78405\Desktop\vnpy_20200608\vnpy\app\cta_strategy\engine.py", line 602, in call_strategy_func
    func()
  File "C:\Users\78405\Desktop\vnpy_20200608\vnpy\app\cta_strategy\strategies\atr_rsi_strategy.py", line 66, in on_init
    self.load_bar(10)
  File "C:\Users\78405\Desktop\vnpy_20200608\vnpy\app\cta_strategy\template.py", line 245, in load_bar
    use_database
  File "C:\Users\78405\Desktop\vnpy_20200608\vnpy\app\cta_strategy\engine.py", line 535, in load_bar
    symbol, exchange = extract_vt_symbol(vt_symbol)
  File "C:\Users\78405\Desktop\vnpy_20200608\vnpy\trader\utility.py", line 27, in extract_vt_symbol
    symbol, exchange_str = vt_symbol.split(".")
ValueError: not enough values to unpack (expected 2, got 1)

description

description

Administrator
avatar
加入于:
帖子: 4372
声望: 250

接下来的2.1.4版本增加了直达接口支持的交易所

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