Skip to content

rerouteMktDataReq / rerouteMktDepthReq missing from Wrapper — AttributeError on CFD reroute #206

Description

@msdavid

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

  1. Subscribe to market data for a CFD contract (e.g., CFD('AAPL'))
  2. IBKR internally reroutes the CFD to the underlying stock
  3. Message ID 91/92 arrives from the server
  4. decoder.py dispatches to wrapper.rerouteMktDataReq(reqId, conId, exchange) or wrapper.rerouteMktDepthReq(reqId, conId, exchange)
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions