--> 805 self.reqOrderInsert(tora_req, self.reqid)
807 order: OrderData = req.create_order_data(str(order_id), self.gateway_name)
808 self.gateway.on_order(order)
RuntimeError: Unable to cast Python instance of type <class 'int'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
以上为报错信息,
print(tora_req, self.reqid)
{'ShareholderID': 'B884121111', 'SecurityID': '10006504', 'ExchangeID': '1', 'OrderRef': 14521010214, 'OrderPriceType': '2', 'Direction': '0', 'CombOffsetFlag': '1', 'CombHedgeFlag': '1', 'LimitPrice': 0.0579, 'VolumeTotalOriginal': 5, 'TimeCondition': '3', 'VolumeCondition': '1'} 10214
原因为 'OrderRef': 14521010214,超出了int的范围。期权合约数较多,每次查询合约self.reqid就会增加1