从onRspQryInstrument 中打印信息, 西南期货得到如下数据,其中LongMarginRatio和ShortMarginRatio字段数据异常,而期货公司那边用上期所的原始CTP接口获取到的数据正常,据说是没有对浮点值进行转换导致, 请大神帮忙看看是不是这样,有没有解决的办法,感谢!:
{'InstrumentID': 'sc2009', 'ExchangeID': 'INE', 'InstrumentName': '原油2009', 'ExchangeInstID': 'sc2009', 'ProductID': 'sc', 'ProductClass': '1', 'DeliveryYear': 2020, 'DeliveryMonth': 9, 'MaxMarketOrderVolume': 30, 'MinMarketOrderVolume': 1, 'MaxLimitOrderVolume': 500, 'MinLimitOrderVolume': 1, 'VolumeMultiple': 1000, 'PriceTick': 0.1, 'CreateDate': '20180305', 'OpenDate': '20180326', 'ExpireDate': '20200831', 'StartDelivDate': '20200901', 'EndDelivDate': '20200907', 'InstLifePhase': '1', 'IsTrading': 1, 'PositionType': '2', 'PositionDateType': '1', 'LongMarginRatio': 1.7976931348623157e+308, 'ShortMarginRatio': 1.7976931348623157e+308, 'MaxMarginSideAlgorithm': '1', 'UnderlyingInstrID': '', 'StrikePrice': 0.0, 'OptionsType': '\x00', 'UnderlyingMultiple': 0.0, 'CombinationType': '0'}
而其它一些期货公司得到的数据是这样的:
{'InstrumentID': 'wr2011', 'ExchangeID': 'SHFE', 'InstrumentName': 'wr2011', 'ExchangeInstID': 'wr2011', 'ProductID': 'wr', 'ProductClass': '1', 'DeliveryYear': 2020, 'DeliveryMonth': 11, 'MaxMarketOrderVolume': 30, 'MinMarketOrderVolume': 1, 'MaxLimitOrderVolume': 500, 'MinLimitOrderVolume': 1, 'VolumeMultiple': 10, 'PriceTick': 1.0, 'CreateDate': '20191016', 'OpenDate': '20191118', 'ExpireDate': '20201116', 'StartDelivDate': '20201117', 'EndDelivDate': '20201123', 'InstLifePhase': '1', 'IsTrading': 1, 'PositionType': '2', 'PositionDateType': '1', 'LongMarginRatio': 0.08, 'ShortMarginRatio': 0.08, 'MaxMarginSideAlgorithm': '1', 'UnderlyingInstrID': 'wr', 'StrikePrice': 0.0, 'OptionsType': '0', 'UnderlyingMultiple': 1.0, 'CombinationType': '0'}