marketPrice() failed with exception (I think bid/ask was not available).
Had to use ticker.last instead.
Sorry, I can't repro since I subscribed to the correct market data, so I can't give the exact call stack.
One I subscribed to market data, marketPrice() works fine even with reqMarketDataType(3).
Repro:
cont = Index("vix") ib.qualifyContracts(cont) ib.reqMarketDataType(3) #MarketDataTypeEnum.DELAYED) ib.reqMktData(cont, '', False, False) ticker = ib.ticker(cont) ib.sleep(1) print(ticker) print(ticker.marketPrice())
marketPrice() failed with exception (I think bid/ask was not available). Had to use ticker.last instead. Sorry, I can't repro since I subscribed to the correct market data, so I can't give the exact call stack. One I subscribed to market data, marketPrice() works fine even with reqMarketDataType(3).