Skip to content

Instantly share code, notes, and snippets.

@mvexel
Created December 20, 2016 19:19
Show Gist options
  • Save mvexel/e9588b4d9f6ff15891c7d31c3898e3d1 to your computer and use it in GitHub Desktop.
Save mvexel/e9588b4d9f6ff15891c7d31c3898e3d1 to your computer and use it in GitHub Desktop.
stock_quote_function.sh
# Get stock quote from command line
# Call with `sq yhoo`
# By default only last trade price shown
# add extra info in optional second parameter
# for available data see http://vikku.info/codetrash/Yahoo_Finance_Stock_Quote_API
# like so: `sq yhoo c1` will give you % change for the day
function sq() {
curl -s "http://download.finance.yahoo.com/d/quotes.csv?s=$1&f=l1$2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment