Mv to ib_async.. finally. #68

Open
opened 2026-01-26 16:15:39 +00:00 by goodboy · 0 comments

Already had a GH ish reported,

https://github.com/pikers/piker/issues/539

i was only putting it off out of laziness and/or non-necessity BP

BUT we actually have a reason now to switch!


“Fixes” we need

  • the IB.qualifyContractsAsync() method now offers a returnAll: bool which solves an issue i’ve seen with various so called “ambiguous” contract queries,

    https://github.com/ib-api-reloaded/ib_async/blob/main/ib_async/ib.py#L2115

    For ex., currently we can’t load silver futes contracts due to the old ib_insync only warning on such cases..

    
    Jan 26 11:21:49 (brokerd.ib[6272cb], 284364, no task context))
    [WARNING] piker.ib_insync ib.py:1806 Ambiguous contract:
    Future(symbol='si', lastTradeDateOrContractMonth='20261229',
    exchange='COMEX'), possibles are [Contract(secType='FUT',
    conId=535526329, symbol='SI',
    lastTradeDateOrContractMonth='20261229', multiplier='5000',
    exchange='COMEX', currency='USD', localSymbol='SIZ6',
    tradingClass='SI'), Contract(secType='FUT', conId=842178357,
    symbol='SI', lastTradeDateOrContractMonth='20261229',
    multiplier='1000', exchange='COMEX', currency='USD',
    localSymbol='SILZ6', tradingClass='SIL')]

    ^ which occurs just before a crash originating in our piker.brokers.ib.api.Client.get_sym_details() which fails to find a single matching contract based on the fqme requested from the the chart’s mkt search..

Already had a GH ish reported, https://github.com/pikers/piker/issues/539 i was only putting it off out of laziness and/or non-necessity BP BUT we actually have a reason now to switch! --- #### "Fixes" we need - [ ] the `IB.qualifyContractsAsync()` method now offers a `returnAll: bool` which solves an issue i've seen with various so called "ambiguous" contract queries, https://github.com/ib-api-reloaded/ib_async/blob/main/ib_async/ib.py#L2115 For ex., currently we can't load silver futes contracts due to the old `ib_insync` only warning on such cases.. ```python Jan 26 11:21:49 (brokerd.ib[6272cb], 284364, no task context)) [WARNING] piker.ib_insync ib.py:1806 Ambiguous contract: Future(symbol='si', lastTradeDateOrContractMonth='20261229', exchange='COMEX'), possibles are [Contract(secType='FUT', conId=535526329, symbol='SI', lastTradeDateOrContractMonth='20261229', multiplier='5000', exchange='COMEX', currency='USD', localSymbol='SIZ6', tradingClass='SI'), Contract(secType='FUT', conId=842178357, symbol='SI', lastTradeDateOrContractMonth='20261229', multiplier='1000', exchange='COMEX', currency='USD', localSymbol='SILZ6', tradingClass='SIL')] ``` ^ which occurs just before a crash originating in our `piker.brokers.ib.api.Client.get_sym_details()` which fails to find a *single* matching contract based on the fqme requested from the the chart's mkt search..
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pikers/piker#68
There is no content yet.