Skip to content

A bash-script to check the stock market price update from the CLI using Yahoo Finance API.

License

Notifications You must be signed in to change notification settings

josephreynolds1/stock-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stock-cli

Build Status GitHub repo size GitHub

Find the price data of a certain stock / crypto / commodity / forex / etf / futures using this bash-script.

Executing the script

stock.sh

Help

Usage:

To make the script executable:
chmod +x stock.sh

To see the price update of an asset:
./stock.sh {symbol/ticker}

To make it executable from the terminal every time we login using stock {usage},
we’ll have to add it to the bash profile in our bin directory.

Examples:

./stock.sh TSLA (Ticker/Symbol Of Tesla Inc.)
./stock.sh 600883.SS (600883 = Yunnan Bowin Tech; SS = Shanghai Stock Exchange)
./stock.sh BTC-USD (Cryptocurrency - CCC)
./stock.sh GOLD (Commodity)
./stock.sh USDCNY=X (Forex Rate)
./stock.sh BRK-A (ETF)

Sample commands:

./stock.sh TSLA 600883.SS BTC-USD GOLD USDCNY=X BRK-A
watch -n 1 -c ./stock.sh TSLA 600883.SS BTC-USD GOLD USDCNY=X BRK-A (to see the updates of every sec)

Ticker/Symbol lookup:

https://finance.yahoo.com/lookup

About

A bash-script to check the stock market price update from the CLI using Yahoo Finance API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%