diff --git a/examples/VnTrader/CTP_connect.json b/examples/VnTrader/CTP_connect.json index 1b4d5a42..e4bfa6b8 100644 --- a/examples/VnTrader/CTP_connect.json +++ b/examples/VnTrader/CTP_connect.json @@ -2,6 +2,6 @@ "brokerID": "9999", "mdAddress": "tcp://180.168.146.187:10011", "tdAddress": "tcp://180.168.146.187:10001", - "userID": "000300", - "password": "19890624" + "userID": "simnow申请", + "password": "simnow申请" } \ No newline at end of file diff --git a/examples/VnTrader/CTP_connect.json.test b/examples/VnTrader/CTP_connect_带客户端认证.json similarity index 58% rename from examples/VnTrader/CTP_connect.json.test rename to examples/VnTrader/CTP_connect_带客户端认证.json index e4bfa6b8..7e20c312 100644 --- a/examples/VnTrader/CTP_connect.json.test +++ b/examples/VnTrader/CTP_connect_带客户端认证.json @@ -3,5 +3,7 @@ "mdAddress": "tcp://180.168.146.187:10011", "tdAddress": "tcp://180.168.146.187:10001", "userID": "simnow申请", - "password": "simnow申请" + "password": "simnow申请", + "userProductInfo": "客户端名称", + "authCode": "客户端认证码" } \ No newline at end of file diff --git a/vnpy/trader/gateway/ctpGateway/ctpGateway.py b/vnpy/trader/gateway/ctpGateway/ctpGateway.py index dfe34f78..edea15e8 100644 --- a/vnpy/trader/gateway/ctpGateway/ctpGateway.py +++ b/vnpy/trader/gateway/ctpGateway/ctpGateway.py @@ -142,7 +142,7 @@ class CtpGateway(VtGateway): # 创建行情和交易接口对象 self.mdApi.connect(userID, password, brokerID, mdAddress) - self.tdApi.connect(userID, password, brokerID, tdAddress,authCode, userProductInfo) + self.tdApi.connect(userID, password, brokerID, tdAddress, authCode, userProductInfo) # 初始化并启动查询 self.initQuery()