Open ihiasi opened 4 years ago
Just define the appropriate Contract
and pass it to reqHistoricalData()
.
For a stock option something along these lines:
opt = Jib.Contract(symbol="GOOG", secType="OPT", currency="USD", exchange="SMART")
opt.lastTradeDateOrContractMonth = "20200717" # expiration
opt.strike = 1450 # strike price
opt.right = "C" # call
Check IB docs for more contract examples. However, keep in mind that, except for forex and commodities, you need a paid subscription to be able to download pretty much any other historical data.
Hi - is it possible to have an example of how would I get past and future stock options prices ? Thank you.