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
Get the following error when requesting historical data for BTC-USD (also tried BTC and BTC-BTC):
D:\Documents\BTC>python "Test YFinance.py"
0.2.51
Failed to get ticker 'BTC-BTC' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x0000013E6D8B6900>: Failed to resolve 'fc.yahoo.com' ([Errno 11004] getaddrinfo failed)"))
$BTC-BTC: possibly delisted; no price data found (period=1mo)
Describe bug
Get the following error when requesting historical data for BTC-USD (also tried BTC and BTC-BTC):
D:\Documents\BTC>python "Test YFinance.py"
0.2.51
Failed to get ticker 'BTC-BTC' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x0000013E6D8B6900>: Failed to resolve 'fc.yahoo.com' ([Errno 11004] getaddrinfo failed)"))
$BTC-BTC: possibly delisted; no price data found (period=1mo)
Simple code that reproduces your problem
import yfinance as yf
print(yf.version)
Fetch historical market data for the last 30 days
StockInfo = yf.Ticker('BTC-BTC')
historical_data = StockInfo.history(period="1mo")
Debug log
D:\Documents\BTC>python "Test YFinance.py"
0.2.51
DEBUG Entering history()
DEBUG Entering _fetch_ticker_tz()
DEBUG Entering get()
DEBUG Entering _make_request()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/BTC-BTC
DEBUG params=frozendict.frozendict({'range': '1d', 'interval': '1d'})
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
ERROR Failed to get ticker 'BTC-BTC' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000002414C5B6900>: Failed to resolve 'fc.yahoo.com' ([Errno 11004] getaddrinfo failed)"))
DEBUG Exiting _fetch_ticker_tz()
DEBUG Entering history()
DEBUG BTC-BTC: Yahoo GET parameters: {'range': '1mo', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG Entering _make_request()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/BTC-BTC
DEBUG params={'range': '1mo', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
ERROR $BTC-BTC: possibly delisted; no price data found (period=1mo)
DEBUG Exiting history()
DEBUG Exiting history()
Bad data proof
No response
yfinance
version0.2.51
Python version
3.13.0
Operating system
Windows 10 Pro - fully updated
The text was updated successfully, but these errors were encountered: