You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases you're interested to download all data u can download in a specific interval.
I suppose the correct method, is use the "max" period option, but it only works with "1m" value as interval.
Simple code that reproduces your problem
import yfinance as yf
ticker = yf.Ticker("BTC-USD")
print(ticker.history(interval = "1m", period = "max"))
print(ticker.history(interval = "1h", period = "max"))
Debug log
Open High Low Close Volume Dividends Stock Splits
Datetime
2024-04-17 11:16:00+00:00 63106.847656 63106.847656 63106.847656 63106.847656 0 0.0 0.0
2024-04-17 11:17:00+00:00 63181.269531 63181.269531 63181.269531 63181.269531 0 0.0 0.0
2024-04-17 11:18:00+00:00 63179.203125 63179.203125 63179.203125 63179.203125 1630208 0.0 0.0
2024-04-17 11:19:00+00:00 63152.871094 63152.871094 63152.871094 63152.871094 4526080 0.0 0.0
2024-04-17 11:20:00+00:00 63122.992188 63122.992188 63122.992188 63122.992188 8736768 0.0 0.0
... ... ... ... ... ... ... ...
2024-04-24 11:08:00+00:00 66438.062500 66438.062500 66438.062500 66438.062500 0 0.0 0.0
2024-04-24 11:09:00+00:00 66430.968750 66430.968750 66430.968750 66430.968750 61263872 0.0 0.0
2024-04-24 11:10:00+00:00 66431.734375 66431.734375 66431.734375 66431.734375 0 0.0 0.0
2024-04-24 11:11:00+00:00 66432.492188 66432.492188 66432.492188 66432.492188 0 0.0 0.0
2024-04-24 11:12:00+00:00 66437.500000 66437.500000 66437.500000 66437.500000 0 0.0 0.0
[8740 rows x 7 columns]
BTC-USD: 1h data not available for startTime=1410912000 and endTime=1713957318. The requested range must be within the last 730 days.
Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume]
Index: []
yfinance version
0.2.38
Python version
3.10.12
Operating system
Pop!_OS 22.04 LTS
The text was updated successfully, but these errors were encountered:
Describe bug
In some cases you're interested to download all data u can download in a specific interval.
I suppose the correct method, is use the "max" period option, but it only works with "1m" value as interval.
Simple code that reproduces your problem
Debug log
yfinance
version0.2.38
Python version
3.10.12
Operating system
Pop!_OS 22.04 LTS
The text was updated successfully, but these errors were encountered: