def OnRspAuthenticate(self, pRspAuthenticateField, pRspInfo, nRequestID, bIsLast): logger.info('OnRspAuthenticate') req = ApiStructure.ReqUserLoginField(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.passwd) self.ReqUserLogin(req, self.inc_request_id())
def OnFrontConnected(self): req = ApiStructure.ReqUserLoginField(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.password) self.ReqUserLogin(req, self.request_id) print("trader on front connection")
def OnFrontConnected(self): """ :return: """ user_login = ApiStructure.ReqUserLoginField(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.password) self.ReqUserLogin(user_login, self.request_id)
def OnFrontConnected(self): """ 当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。 :return: """ logger.info('OnFrontConnected') req = ApiStructure.ReqUserLoginField(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.passwd) self.requestid += 1 r = self.ReqUserLogin(req, self.requestid)
def OnRspAuthenticate(self, pRspAuthenticateField, pRspInfo, nRequestID, bIsLast): print("OnRspAuthenticate") print("pRspInfo:", pRspInfo) print("nRequestID:", nRequestID) print("bIsLast:", bIsLast) if pRspInfo.ErrorID == 0: req = ApiStructure.ReqUserLoginField(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.password) self.ReqUserLogin(req, self.request_id) else: print("auth failed")
def OnFrontConnected(self): print('Td 前置机已连接') req = ApiStructure.ReqUserLoginField(BrokerID=self.broker_id, UserID=self.investor_id, Password=self.password) self.ReqUserLogin(req, self.request_id)