{"id":9744,"library":"finance-datareader","title":"FinanceDataReader","description":"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.","status":"active","version":"0.9.110","language":"en","source_language":"en","source_url":"https://github.com/financedata/financedatareader","tags":["finance","data","stock","market","quant"],"install":[{"cmd":"pip install finance-datareader","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core data structure for returned dataframes.","package":"pandas","optional":false},{"reason":"Used for making HTTP requests to data sources.","package":"requests","optional":false}],"imports":[{"symbol":"FinanceDataReader","correct":"import FinanceDataReader as fdr"}],"quickstart":{"code":"import FinanceDataReader as fdr\nimport pandas as pd\n\n# Get a list of KOSPI stocks\nkospistock_list = fdr.StockListing('KOSPI')\nprint(f\"First 5 KOSPI stocks:\\n{kospistock_list.head()}\")\n\n# Get Samsung Electronics (005930) historical prices from 2017 to 2018\ndf = fdr.DataReader('005930', '2017-01-01', '2018-12-31')\nprint(f\"\\nSamsung Electronics prices (2017-2018):\\n{df.head()}\")\n\n# Get Apple (AAPL) historical prices for the last year\n# Using pd.Timestamp.now() for dynamic date calculation\ntoday = pd.Timestamp.now()\noneyear_ago = today - pd.DateOffset(years=1)\napple_df = fdr.DataReader('AAPL', oneyear_ago.strftime('%Y-%m-%d'), today.strftime('%Y-%m-%d'))\nprint(f\"\\nApple prices (last year):\\n{apple_df.head()}\")","lang":"python","description":"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`."},"warnings":[{"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.","message":"Data 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Underlying 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.","severity":"breaking","affected_versions":"All versions"},{"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.","message":"Performance 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"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.","cause":"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.","error":"RemoteDataError: No data found for specified query, url:"},{"fix":"Install the library: `pip install finance-datareader`. Ensure the import statement is `import FinanceDataReader as fdr`.","cause":"The library is either not installed, or the import statement has a typo (e.g., incorrect casing or trying to import a submodule directly).","error":"ModuleNotFoundError: No module named 'FinanceDataReader'"},{"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')`.","cause":"The start or end date provided to `fdr.DataReader` is not in a recognized format (e.g., 'YYYY-MM-DD').","error":"ValueError: Invalid 'start' or 'end' date format."}]}