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

哪位帮忙看看下面代码对不对,运行了啥也不显示,也没报错,
如果代码没错的话后面怎么接收数据?

from vnpy.app.script_trader import init_cli_trading
from vnpy.gateway.ctp import CtpGateway
setting = {
"用户名": "**",
"密码": "**",
"经纪商代码": "9999",
"交易服务器": "180.168.146.187:10000",
"行情服务器": "180.168.146.187:10010",
"产品名称": "",
"授权编码": "",
"产品信息": ""
}
engine = init_cli_trading([CtpGateway])
engine.connect_gateway(setting,"CTP")
engine.subscribe(['AU1912'])

Administrator
avatar
加入于:
帖子: 1919
声望: 87

请参考这个Jupyter中的交易例子试试吧:https://github.com/vnpy/vnpy/blob/master/examples/notebook_trading/demo_notebook.ipynb

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