tstock – Check stocks from the terminal!
? tstock is a tool to easily generate stock charts from the command line.
tstock aapl to get a 3 month candlestick chart of $AAPL in your terminal!
- Python 3.6 or greater
tstock is available on the AUR. If you are on an Archlinux system, you can just install it using your AUR helper. Example using
yay -S tstock
tstock is also available as a Python package. You can install it using
pip3 install tstock
MarketStack API setup
tstock, you will need a MarketStack API key to pull the market data.
- Make a free MarketStack API account at https://marketstack.com/signup/free
- Login and find your API Access Key on the Dashboard page
export MARKETSTACK_API_KEY=<your access key>. You can make this permanent by adding that command to your
./tstock TICKER to get the 3 month chart of
-d DAYS to specify the number of days back you want to pull. Use
-y LINES to specify the length of the chart’s y axis.
You can get indexes by appending
.INDX. for example,
./tstock DJI.INDX to get the Dow Jones Industrial Average. Find more information on how to specify special tickers on MarketWatch’s API Docs: https://marketstack.com/documentation
- The free tier of the API is limited to 100 API calls per month.