Merge pull request #1555 from ieachen/dev-feature
fix a bug in CTP login using UserProductInfo and AuthCode
This commit is contained in:
commit
713b534ed8
@ -405,7 +405,7 @@ class CtpTdApi(TdApi):
|
|||||||
""""""
|
""""""
|
||||||
if not error['ErrorID']:
|
if not error['ErrorID']:
|
||||||
self.authStatus = True
|
self.authStatus = True
|
||||||
self.writeLog("交易授权验证成功")
|
self.gateway.write_log("交易授权验证成功")
|
||||||
self.login()
|
self.login()
|
||||||
else:
|
else:
|
||||||
self.gateway.write_error("交易授权验证失败", error)
|
self.gateway.write_error("交易授权验证失败", error)
|
||||||
@ -418,7 +418,7 @@ class CtpTdApi(TdApi):
|
|||||||
self.login_status = True
|
self.login_status = True
|
||||||
self.gateway.write_log("交易登录成功")
|
self.gateway.write_log("交易登录成功")
|
||||||
|
|
||||||
# Confirm settelment
|
# Confirm settlement
|
||||||
req = {
|
req = {
|
||||||
"BrokerID": self.brokerid,
|
"BrokerID": self.brokerid,
|
||||||
"InvestorID": self.userid
|
"InvestorID": self.userid
|
||||||
@ -662,7 +662,7 @@ class CtpTdApi(TdApi):
|
|||||||
"UserID": self.userid,
|
"UserID": self.userid,
|
||||||
"BrokerID": self.brokerid,
|
"BrokerID": self.brokerid,
|
||||||
"AuthCode": self.auth_code,
|
"AuthCode": self.auth_code,
|
||||||
"ProductInfo": self.product_info
|
"UserProductInfo": self.product_info
|
||||||
}
|
}
|
||||||
|
|
||||||
self.reqid += 1
|
self.reqid += 1
|
||||||
@ -678,7 +678,8 @@ class CtpTdApi(TdApi):
|
|||||||
req = {
|
req = {
|
||||||
"UserID": self.userid,
|
"UserID": self.userid,
|
||||||
"Password": self.password,
|
"Password": self.password,
|
||||||
"BrokerID": self.brokerid
|
"BrokerID": self.brokerid,
|
||||||
|
"UserProductInfo": self.product_info
|
||||||
}
|
}
|
||||||
|
|
||||||
self.reqid += 1
|
self.reqid += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user