def OnRspQrySettlementInfo(self, pSettlementInfo: 'CThostFtdcSettlementInfoField', pRspInfo: 'CThostFtdcRspInfoField', nRequestID: 'int', bIsLast: 'bool') -> "void": print ("OnRspQrySettlementInfo") if pSettlementInfo is not None : print ("content:",pSettlementInfo.Content) else : print ("content null") pSettlementInfoConfirm=api.CThostFtdcSettlementInfoConfirmField() pSettlementInfoConfirm.BrokerID=BROKERID pSettlementInfoConfirm.InvestorID=USERID self.tapi.ReqSettlementInfoConfirm(pSettlementInfoConfirm,0) print ("send ReqSettlementInfoConfirm ok")
def OnRspQrySettlementInfo( self, pSettlementInfo: 'CThostFtdcSettlementInfoField', pRspInfo: 'CThostFtdcRspInfoField', nRequestID: 'int', bIsLast: 'bool'): # 结算确认 if pSettlementInfo is not None: print('content {}'.format(pSettlementInfo.Content)) if bIsLast: obj = tdapi.CThostFtdcSettlementInfoConfirmField() obj.BrokerID = BROKERID obj.InvestorID = USERID self.api.ReqSettlementInfoConfirm(obj, 0) print('结算确认')
def OnRspQrySettlementInfo(self, pSettlementInfo, pRspInfo, nRequestID, bIsLast) : print ("OnRspQrySettlementInfo") global ct if pSettlementInfo is not None : #print "content:",pSettlementInfo.Content ct.append(pSettlementInfo.Content) print("abc") #print(ct) else : print "content null" if bIsLast : pSettlementInfoConfirm=api.CThostFtdcSettlementInfoConfirmField() pSettlementInfoConfirm.BrokerID=BROKERID pSettlementInfoConfirm.InvestorID=USERID self.tapi.ReqSettlementInfoConfirm(pSettlementInfoConfirm,0) print "send ReqSettlementInfoConfirm ok"