Beispiel #1
0
    def OnRspUserLogin(self, pRspUserLogin, pRspInfo, nRequestID, bIsLast):

        if pRspInfo.ErrorID != 0:
            print("Trader OnRspUserLogin failed error_id=%s msg:%s",
                  pRspInfo.ErrorID, pRspInfo.ErrorMsg.decode('gbk'))
        else:
            print("Trader user login successfully")

            inv = ApiStructure.QryInvestorField(BrokerID=self.broker_id,
                                                InvestorID=self.investor_id)

            self.ReqQryInvestor(inv, self.inc_request_id())
            req = ApiStructure.SettlementInfoConfirmField(
                BrokerID=self.broker_id, InvestorID=self.investor_id)

            self.ReqSettlementInfoConfirm(req, self.inc_request_id())

            self.Join()
Beispiel #2
0
 def OnRspUserLogin(self, pRspUserLogin, pRspInfo, nRequestID, bIsLast):
     if bIsLast and not self.isErrorRspInfo(pRspInfo):
         logger.info('OnRspUserLogin %s' % bIsLast)
         req = ApiStructure.SettlementInfoConfirmField(
             BrokerID=self.broker_id, InvestorID=self.investor_id)
         self.ReqSettlementInfoConfirm(req, self.inc_request_id())