def OnRspAuthenticate(self, pRspAuthenticateField, pRspInfo, nRequestID, bIsLast): # print(pRspAuthenticateField.AppType) info.append(copy.deepcopy(pRspAuthenticateField)) print('client authenticate done. Req User login...客户端认证完成,请求用户登录.') time.sleep(3) req = ApiStruct.ReqUserLogin(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.password) r = self.ReqUserLogin(req, self.inc_request_id()) print(r)
def user_login(self, broker_id, investor_id, passwd): req = ApiStruct.ReqUserLogin(BrokerID=broker_id, UserID=investor_id, Password=passwd) self.requestid += 1 r = self.ReqUserLogin(req, self.requestid)