添加XTP接口到run.py中

This commit is contained in:
vn.py 2017-08-31 17:55:42 +08:00
parent 1b8612ffaf
commit c12d08ffcc
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,10 @@
{
"userID": "请联系中泰证券申请",
"password": "请联系中泰证券申请",
"clientID": 1,
"softwareKey": "请联系中泰证券申请",
"tdAddress": "120.27.164.69",
"tdPort": 6001,
"mdAddress": "120.27.164.138",
"mdPort": 6002
}

View File

@ -23,6 +23,9 @@ if system == 'Windows':
from vnpy.trader.gateway import (femasGateway, xspeedGateway,
sgitGateway, shzdGateway)
if system == 'Linux':
from vnpy.trader.gateway import xtpGateway
# 加载上层应用
from vnpy.trader.app import (riskManager, ctaStrategy, spreadTrading)
@ -52,6 +55,9 @@ def main():
me.addGateway(sgitGateway)
me.addGateway(shzdGateway)
if system == 'Linux':
me.addGateway(xtpGateway)
# 添加上层应用
me.addApp(riskManager)
me.addApp(ctaStrategy)