vn.py官网
开源量化社区
Member
加入于:
帖子: 40
声望: 0

from vnpy.app.script_trader.cli import init_cli_trading
...
self.engine = init_cli_trading([HuobisGateway,BinancesGateway,OkexGateway])
self.engine.connect_gateway(OKEX_SETTING, "OKEX")
self.engine.connect_gateway(HUOBIS_SETTING, "HUOBIS")
self.engine.connect_gateway(BINANCES_SETTING, "BINANCES")
...
self.engine.subscribe([MAIN_VT_SYMBOL,SUB_VT_SYMBOL])

程序最后用engine.close() sys.exit(0),都无法真正结束程序,网关信息还是不断打印出来,如何才能彻底结束?

Administrator
avatar
加入于:
帖子: 4749
声望: 278

安全退出请调用self.engine.main_engine.close()函数

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

沪公网安备 31011502017034号