楼主请问下,我通过接口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?大佬们帮忙看下哈