Bug: rerouteMktDataReq / rerouteMktDepthReq missing from Wrapper — AttributeError on CFD reroute
Version
ib_async 2.1.0
Description
When IBKR reroutes a CFD order to the underlying stock, the API sends message IDs 91 and 92. decoder.py (lines 122-123) routes these to wrapper.rerouteMktDataReq and wrapper.rerouteMktDepthReq respectively.
However, the Wrapper class in wrapper.py does not define these methods. This means any CFD reroute event raises AttributeError.
Steps to reproduce
- Subscribe to market data for a CFD contract (e.g.,
CFD('AAPL'))
- IBKR internally reroutes the CFD to the underlying stock
- Message ID 91/92 arrives from the server
decoder.py dispatches to wrapper.rerouteMktDataReq(reqId, conId, exchange) or wrapper.rerouteMktDepthReq(reqId, conId, exchange)
AttributeError: 'Wrapper' object has no attribute 'rerouteMktDataReq'
Expected behavior
Wrapper should define rerouteMktDataReq and rerouteMktDepthReq methods (matching the TWS API EWrapper interface), and ideally surface them as events on the IB class.
Code references
decoder.py L122-123: message routing
wrapper.py: missing method definitions
- TWS API reference:
EWrapper::rerouteMktDataReq, EWrapper::rerouteMktDepthReq
Bug:
rerouteMktDataReq/rerouteMktDepthReqmissing from Wrapper — AttributeError on CFD rerouteVersion
ib_async 2.1.0
Description
When IBKR reroutes a CFD order to the underlying stock, the API sends message IDs 91 and 92.
decoder.py(lines 122-123) routes these towrapper.rerouteMktDataReqandwrapper.rerouteMktDepthReqrespectively.However, the
Wrapperclass inwrapper.pydoes not define these methods. This means any CFD reroute event raisesAttributeError.Steps to reproduce
CFD('AAPL'))decoder.pydispatches towrapper.rerouteMktDataReq(reqId, conId, exchange)orwrapper.rerouteMktDepthReq(reqId, conId, exchange)AttributeError: 'Wrapper' object has no attribute 'rerouteMktDataReq'Expected behavior
Wrappershould definererouteMktDataReqandrerouteMktDepthReqmethods (matching the TWS API EWrapper interface), and ideally surface them as events on theIBclass.Code references
decoder.pyL122-123: message routingwrapper.py: missing method definitionsEWrapper::rerouteMktDataReq,EWrapper::rerouteMktDepthReq