VeighNa量化社区
你的开源社区量化交易平台
ShineWell's Avatar
Member
离线
1 帖子
声望: 0

楼主请问下,我通过接口reqQryInstrumentCommissionRate查询手续费返回的成交量都是0呢,我的代码如下:

def onRspQryInstrumentCommissionRate(self, data: dict, error: dict, reqid: int, last: bool):
    """查询合约手续费率"""
    symbol = data.get('InstrumentID', None)
    if symbol:
        self.commission_data[symbol] = data
        self.gateway.write_log("%s手续费:%s"% (symbol, data))


def query_commission(self, symbol):
    self.commission_req['BrokerID'] = self.brokerid
    self.commission_req['InvestorID'] = self.userid
    self.commission_req['InstrumentID'] = symbol
    self.reqid += 1
    # 请求查询手续费率
    self.reqQryInstrumentCommissionRate(self.commission_req, self.reqid)

结果如下:

{
'InstrumentID': 'hc',
'InvestorRange': '1',
'BrokerID': '9999',
'InvestorID': '00000000',
'OpenRatioByMoney': 0.0001,
'OpenRatioByVolume': 0.0,
'CloseRatioByMoney': 0.0001,
'CloseRatioByVolume': 0.0,
'CloseTodayRatioByMoney': 0.0001,
'CloseTodayRatioByVolume': 0.0,
'ExchangeID': '',
'BizType': '\x00',
'InvestUnitID': ''
}

InstrumentID 我填写的是hc1910,怎么返回的是hc?大佬们帮忙看下哈

© 2015-2022 微信 18391752892
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】