Registry / data / finance-datareader

finance-datareader

JSON →
library0.9.202pypypi✓ verified 88d ago

FinanceDataReader is a Python library for retrieving various financial data, including stock prices, stock lists for multiple markets (Korea, US, etc.), and macroeconomic data. It currently supports version 0.9.110 and is actively maintained with frequent updates to adapt to changing data sources and improve functionality.

pip install finance-datareader
INSTALL
IMPORT
SIG · FINANCE-DATAREADER
F
finance-datareader
datapythonv0.9.202
Install
11.9s avg
Import
2422ms
Disk
255MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.9.202 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 2.490s · 253.8MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 11.9s · import 2.354s · 246MB
255MB installed
● package 255MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FinanceDataReader
✓ import FinanceDataReader as fdr

This quickstart demonstrates how to fetch stock listings for KOSPI and historical daily prices for specific tickers like Samsung Electronics (005930) and Apple (AAPL) using `FinanceDataReader`.

import FinanceDataReader as fdr import pandas as pd # Get a list of KOSPI stocks kospistock_list = fdr.StockListing('KOSPI') print(f"First 5 KOSPI stocks:\n{kospistock_list.head()}") # Get Samsung Electronics (005930) historical prices from 2017 to 2018 df = fdr.DataReader('005930', '2017-01-01', '2018-12-31') print(f"\nSamsung Electronics prices (2017-2018):\n{df.head()}") # Get Apple (AAPL) historical prices for the last year # Using pd.Timestamp.now() for dynamic date calculation today = pd.Timestamp.now() oneyear_ago = today - pd.DateOffset(years=1) apple_df = fdr.DataReader('AAPL', oneyear_ago.strftime('%Y-%m-%d'), today.strftime('%Y-%m-%d')) print(f"\nApple prices (last year):\n{apple_df.head()}")
FinanceDataReader --version
Debug
Known issues
gotchaData availability and consistency can vary significantly across different sources and tickers. Some tickers may not have data for the full requested period, or data quality/granularity might differ.
fix
Always validate the returned DataFrame (e.g., check `df.empty`, `df.index.min()`, `df.index.max()`) to ensure the data aligns with expectations. Consider trying alternative data sources if available, or a different library for specific data needs.
affects: All versions
breakingUnderlying data sources (websites, APIs) can change their structure or access methods without notice, leading to `RemoteDataError` or incorrect data fetching. This library frequently updates to adapt, but intermittent issues are possible.
fix
Ensure you are using the latest version of `finance-datareader` (`pip install --upgrade finance-datareader`). If an issue persists, check the GitHub issues page for similar reports or open a new one. Consider implementing retry logic for critical data fetching.
affects: All versions
gotchaPerformance can be slow when requesting very large datasets or making many sequential calls, as it often involves web scraping. Data for US stocks via Yahoo Finance can be slower compared to Korean data.
fix
For large requests, consider breaking them into smaller chunks or implementing caching. For multiple tickers, explore if the data source supports batch requests (though `FinanceDataReader` typically handles one ticker at a time). Use a local data store if you frequently access the same data.
affects: All versions
Errors
Common errors & fixes
RemoteDataError: No data found for specified query, url:
The data source did not return any data for the requested ticker, date range, or the underlying website structure changed. This is common if the ticker is wrong, the dates are out of range for the source, or the source has updated its layout.
fix
Double-check the ticker symbol and date range for correctness. Ensure `finance-datareader` is updated to the latest version (`pip install --upgrade finance-datareader`). If the problem persists, the data source may have changed or the data is genuinely unavailable.
ModuleNotFoundError: No module named 'FinanceDataReader'
The library is either not installed, or the import statement has a typo (e.g., incorrect casing or trying to import a submodule directly).
fix
Install the library: `pip install finance-datareader`. Ensure the import statement is `import FinanceDataReader as fdr`.
ValueError: Invalid 'start' or 'end' date format.
The start or end date provided to `fdr.DataReader` is not in a recognized format (e.g., 'YYYY-MM-DD').
fix
Ensure dates are provided as strings in 'YYYY-MM-DD' format, or as `datetime.date` or `pandas.Timestamp` objects. For example: `fdr.DataReader('005930', '2023-01-01', '2023-12-31')`.
Upgrade
Version history
0.9.202latest on PyPI · released May 13, 2026
Audit
Dependencies
pandasrequiredCore data structure for returned dataframes.
requestsrequiredUsed for making HTTP requests to data sources.
Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
1
Resources
finance-datareader — pip install finance-datareader · libregistry