Skip to content

Futures ticker issue on v2.0.1 #182

@gnzsnz

Description

@gnzsnz

this is working fine on v1.0.3, and somehow failing on v2.0.1

reproduction steps

import ib_async

ib_async.util.startLoop()
ib.connect('localhost',7497,clientId=30)

ib.reqMarketDataType(marketDataType=3)

contract_spy = ib_async.Stock("SPY","SMART","USD")
ib.qualifyContracts(contract_spy)
spy_ticker = ib.reqMktData(spy_contract,"",False,False) # works OK

# get ticker for Futures
vol_details = ib.reqContractDetails(ib_async.Future(
    symbol="VIX", exchange="CFE", currency="USD", tradingClass="VX"
))
vol_contracts = [c.contract for c in vol_details]
# get tickers for futures
vol_tickers = [ib.reqMktData(c,"",False,False) for c in vol_contracts]
# errors output
2025-10-20 18:31:55,733 - ERROR - tickString with tickType 88: unhandled value: '1760977305'
2025-10-20 18:31:55,734 - ERROR - Error for tickGeneric([24, 90, 0.0]):
Traceback (most recent call last):
  File "/Users/gonzo/.pyenv/versions/3.12.9/envs/ib-register/lib/python3.12/site-packages/ib_async/decoder.py", line 170, in handler
    method(*args)
  File "/Users/gonzo/.pyenv/versions/3.12.9/envs/ib-register/lib/python3.12/site-packages/ib_async/wrapper.py", line 1208, in tickGeneric
    assert tickType in GENERIC_TICK_MAP, (
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Received tick tickType=90 value=0 but we don't have an attribute mapping for it? Triggered from ticker.contract=Contract(secType='FUT', conId=757241247, symbol='VIX', lastTradeDateOrContractMonth='20251022', multiplier='1000', exchange='CFE', currency='USD', localSymbol='VXV5', tradingClass='VX')
2025-10-20 18:31:55,738 - ERROR - tickString with tickType 88: unhandled value: '1760977313'
2025-10-20 18:31:55,739 - ERROR - Error for tickGeneric([25, 90, 0.0]):
Traceback (most recent call last):
  File "/Users/gonzo/.pyenv/versions/3.12.9/envs/ib-register/lib/python3.12/site-packages/ib_async/decoder.py", line 170, in handler
    method(*args)
  File "/Users/gonzo/.pyenv/versions/3.12.9/envs/ib-register/lib/python3.12/site-packages/ib_async/wrapper.py", line 1208, in tickGeneric
    assert tickType in GENERIC_TICK_MAP, (
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

on v1.0.3 I get tickers.

Image

I'm still investigating, I will update as I get more information.

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