diff --git a/examples/VnTrader/XTP_connect.json b/examples/VnTrader/XTP_connect.json new file mode 100644 index 00000000..ac5ba378 --- /dev/null +++ b/examples/VnTrader/XTP_connect.json @@ -0,0 +1,10 @@ +{ + "userID": "请联系中泰证券申请", + "password": "请联系中泰证券申请", + "clientID": 1, + "softwareKey": "请联系中泰证券申请", + "tdAddress": "120.27.164.69", + "tdPort": 6001, + "mdAddress": "120.27.164.138", + "mdPort": 6002 +} diff --git a/examples/VnTrader/run.py b/examples/VnTrader/run.py index 179a1edb..3199ce23 100644 --- a/examples/VnTrader/run.py +++ b/examples/VnTrader/run.py @@ -22,6 +22,9 @@ from vnpy.trader.gateway import (ctpGateway, oandaGateway, ibGateway, 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)