yf is a CLI tool that allows for quick and easy access to Yahoo! Finance market data.
yf history -t MSFT
The history subcommand outputs historical prices, volume, dividends, and stock splits.
The following command outputs the Microsoft stock data from the past month on a daily interval.
(Run yf history --help
for an explanation on the subcommand.)
To run same command for the uncompiled Python source code, run python bash/src/main.py history -t MSFT
Other subcommands in yf include: actions
, calendar
, dividends
, holders
, sustain
Ubuntu Linux And MacOS
- Python >= 3.4+
- Pyinstaller >= 4.0+
- Yfinance == 0.1.55
- Pip
pip install "pyinstaller>=4.0,<5.0"
pip install yfinance==0.1.55
./bash/install.sh
./bash/uninstall.sh
#Install bats dependency
git clone https://github.com/sstephenson/bats.git
sudo ./bats/install.sh /usr/local
#Run tests
./bash/test/test.sh
Please do not set your pull requests to merge with main
, instead merge them to develop
.
Drop me a note if you have any feedback!