示例#1
0
 def fetch_instrument_marginrate(self, instrument_id):
     req = ApiStruct.QryInstrumentMarginRate(
         BrokerID=self.cuser.broker_id,
         InvestorID=self.cuser.investor_id,
         InstrumentID=instrument_id,
         HedgeFlag=ApiStruct.HF_Speculation)
     r = self.trader.ReqQryInstrumentMarginRate(req, self.inc_request_id())
     logging.info('A:查询保证金率, 函数发出返回值:%s' % r)
 def fetch_instrument_marginrate(self, instrument_id):
     req = ApiStruct.QryInstrumentMarginRate(
         BrokerID=self.broker_id,
         InvestorID=self.investor_id,
         InstrumentID=instrument_id,
         HedgeFlag=ApiStruct.HF_Speculation)
     self.requestid += 1
     r = self.ReqQryInstrumentMarginRate(req, self.requestid)
     print u'A:查询保证金率%s, 函数发出返回值:%s' % (instrument_id, r)
示例#3
0
 def QryInstrumentMarginRate(self, instrument):
     pQryInstrumentMarginRate = ApiStruct.QryInstrumentMarginRate(
         BrokerID=self.userinfo.BrokerID,
         InvestorID=self.userinfo.UserID,
         InstrumentID=instrument,
         HedgeFlag=ApiStruct.HF_Speculation)
     self.IncReqid()
     self.ReqQryInstrumentMarginRate(pQryInstrumentMarginRate,
                                     self.requestid)
 def fetch_instrument_marginrate(self, instrument_id):
     req = UStruct.QryInstrumentMarginRate(BrokerID=self._broker,
                     InvestorID = self._investor,
                     InstrumentID=instrument_id,
                     HedgeFlag = UType.HF_Speculation
             )
     ref_id = self.inc_request_id()
     ret= self.ReqQryInstrumentMarginRate(req, self.inc_request_id())
     logging.info('A:查询保证金率, 函数发出返回值:%s' % ret)
     return ret