This commit is contained in:
vn.py 2017-12-02 21:56:10 +08:00
parent cd8874d68c
commit cc5c85f1ba
3 changed files with 6 additions and 4 deletions

View File

@ -2,6 +2,6 @@
"brokerID": "9999", "brokerID": "9999",
"mdAddress": "tcp://180.168.146.187:10011", "mdAddress": "tcp://180.168.146.187:10011",
"tdAddress": "tcp://180.168.146.187:10001", "tdAddress": "tcp://180.168.146.187:10001",
"userID": "000300", "userID": "simnow申请",
"password": "19890624" "password": "simnow申请"
} }

View File

@ -3,5 +3,7 @@
"mdAddress": "tcp://180.168.146.187:10011", "mdAddress": "tcp://180.168.146.187:10011",
"tdAddress": "tcp://180.168.146.187:10001", "tdAddress": "tcp://180.168.146.187:10001",
"userID": "simnow申请", "userID": "simnow申请",
"password": "simnow申请" "password": "simnow申请",
"userProductInfo": "客户端名称",
"authCode": "客户端认证码"
} }

View File

@ -142,7 +142,7 @@ class CtpGateway(VtGateway):
# 创建行情和交易接口对象 # 创建行情和交易接口对象
self.mdApi.connect(userID, password, brokerID, mdAddress) 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() self.initQuery()