/yf

yf is a CLI tool that allows for quick and easy access to Yahoo! Finance market data.

Primary LanguagePythonApache License 2.0Apache-2.0

yf

Build License

Yahoo! Finance market data downloader for CLI

yf is a CLI tool that allows for quick and easy access to Yahoo! Finance market data.

Quick Start

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

Requirements and tested platforms

Ubuntu Linux And MacOS

Installation

pip install "pyinstaller>=4.0,<5.0"
pip install yfinance==0.1.55

./bash/install.sh

Uninstall

./bash/uninstall.sh

Run tests

#Install bats dependency
git clone https://github.com/sstephenson/bats.git
sudo ./bats/install.sh /usr/local

#Run tests
./bash/test/test.sh

A note on pull requests

Please do not set your pull requests to merge with main, instead merge them to develop.

P.S.

Drop me a note if you have any feedback!