ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
14.93k stars 2.45k forks source link

yfinance There is too little hourly data on options #2025

Open iiivasyaiii opened 3 months ago

iiivasyaiii commented 3 months ago

Hello! Yfinance returns too little hourly data on options (history and download functions). At the same time, the daily data has been available since 2024.01.29. How to correctly download hourly options data? Thanks

opt = yf.Ticker('SPY240816P00420000').history(period="60d", interval="1h") opt

return:

Open High Low Close Volume Dividends Stock Splits Datetime
2024-08-13 09:00:00-04:00 0.01 0.01 0.01 0.01 16 0.0 0.0

and other variant:

opt = yf.download('SPY240816P00420000', period="60d", interval="1h") opt

return:

Open High Low Close Adj Close Volume Datetime
2024-08-13 09:00:00-04:00 0.01 0.01 0.01 0.01 0.01 16

ValueRaider commented 3 months ago

Probably Yahoo Finance Premium, but yfinance doesn't support logging in.