Closed bossdown123 closed 1 year ago
You are correct! It works as advertised.
You requested MIDPOINT
data, so what's the volume of a midpoint? Undefined.
All the possible combinations are in the API documentation: https://interactivebrokers.github.io/tws-api/historical_bars.html#hd_what_to_show
The intention was probably whatToShow='TRADES'
.
I solved this one after one week. The key parts are:
whatToShow='TRADES'
contract = Stock('SPY', 'CBOE', 'USD')
Using the SMART
exchange will default to exchanges that do not report volumes.
Hope it helps.
from ib_insync import *
returns