Data reader for yahoo finance to get daily stocks prices. It can be used to develop backtests and it can get all the historic daily data on yahoo finance
Package selection guidance compiled from public package information, community data, and project usage.
A Flutter/Dart package that fetches daily stock prices from Yahoo Finance, enabling developers to access historical market data for building backtesting tools and financial analysis applications. It supports multiple platforms including Android, iOS, macOS, Windows, and Linux, making it versatile for cross-platform use. The package simplifies integration with Yahoo Finance's public API, allowing seamless retrieval of comprehensive historical price data for stocks and other financial instruments.
Use cases
Backtesting trading strategies
Building financial dashboards
Analyzing historical stock trends
Developing investment research tools
Creating portfolio tracking apps
Key features
Fetches daily historical stock prices
Supports cross-platform deployment
Simple API for data retrieval
Integrates with Yahoo Finance
Enables real-time and historical data access
Suitable for
Financial app developers
Quantitative analysts
Trading strategy builders
Data-driven investment tools
Flutter projects requiring market data
Considerations
Depends on external Yahoo Finance API stability
Limited to daily granularity
Requires internet connection
May have rate limits
Data accuracy depends on Yahoo Finance source
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
This project started as a migration of the pandas datareader functionality to read yahoo finance stock prices.
In December of 2022 yahoo started to encrypt the data in the HTML, so I needed to investigate a way of evolving the package.
And then found a yfinance package that used query2 of yahoo finance API, and started to use it
This lib have a strong advantage on backtesting strategies as it can give all the dataframe in yahoo finance, this means that can get daily data on futures like NQ=F and ES=F since 2000 and it goes as far as getting data from 1927 on the SP500 yahoo finance symbol ^GSPC
Features
Get daily data from yahoo finance for the entire dataframe available
You can also provide your own Dio instance when you need custom behavior like
request caching or shared interceptors:
final dio = Dio()
..interceptors.add(DioCacheInterceptor(options: cacheOptions));
final reader = YahooFinanceDailyReader(dio: dio);
final response = await reader.getDailyDTOs('GOOG');
Additional information
To include in your app as a widget you can start with this future builder and debug your way until your desired result