添加XTP接口到run.py中
This commit is contained in:
parent
1b8612ffaf
commit
c12d08ffcc
10
examples/VnTrader/XTP_connect.json
Normal file
10
examples/VnTrader/XTP_connect.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"userID": "请联系中泰证券申请",
|
||||||
|
"password": "请联系中泰证券申请",
|
||||||
|
"clientID": 1,
|
||||||
|
"softwareKey": "请联系中泰证券申请",
|
||||||
|
"tdAddress": "120.27.164.69",
|
||||||
|
"tdPort": 6001,
|
||||||
|
"mdAddress": "120.27.164.138",
|
||||||
|
"mdPort": 6002
|
||||||
|
}
|
@ -22,6 +22,9 @@ from vnpy.trader.gateway import (ctpGateway, oandaGateway, ibGateway,
|
|||||||
if system == 'Windows':
|
if system == 'Windows':
|
||||||
from vnpy.trader.gateway import (femasGateway, xspeedGateway,
|
from vnpy.trader.gateway import (femasGateway, xspeedGateway,
|
||||||
sgitGateway, shzdGateway)
|
sgitGateway, shzdGateway)
|
||||||
|
|
||||||
|
if system == 'Linux':
|
||||||
|
from vnpy.trader.gateway import xtpGateway
|
||||||
|
|
||||||
# 加载上层应用
|
# 加载上层应用
|
||||||
from vnpy.trader.app import (riskManager, ctaStrategy, spreadTrading)
|
from vnpy.trader.app import (riskManager, ctaStrategy, spreadTrading)
|
||||||
@ -52,6 +55,9 @@ def main():
|
|||||||
me.addGateway(sgitGateway)
|
me.addGateway(sgitGateway)
|
||||||
me.addGateway(shzdGateway)
|
me.addGateway(shzdGateway)
|
||||||
|
|
||||||
|
if system == 'Linux':
|
||||||
|
me.addGateway(xtpGateway)
|
||||||
|
|
||||||
# 添加上层应用
|
# 添加上层应用
|
||||||
me.addApp(riskManager)
|
me.addApp(riskManager)
|
||||||
me.addApp(ctaStrategy)
|
me.addApp(ctaStrategy)
|
||||||
|
Loading…
Reference in New Issue
Block a user