Coder Social home page Coder Social logo

kylebanks / hows-the-market Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 1.03 MB

:chart_with_upwards_trend: Checking in on the market from your command line.

License: MIT License

Makefile 9.29% Go 90.71%
golang command-line-tool stock-market stocks yahoo-finance-api wealth-management

hows-the-market's Introduction

hows-the-market

A totally professional, stylish, sophisticated and generally badass tool for checking in on the market from your command line.

Install

Installation from source requires a working Go environment:

$ go get -u github.com/KyleBanks/hows-the-market

Usage

There's not a whole lot to it, just run hows-the-market to see your fate:

$ hows-the-market

Example output

Of course, you can also use --help to display usage information.

Custom Symbols

By default, hows-the-market uses the S&P 500, DOW and NASDAQ to measure your fortunes. If you prefer to use your own symbols (and you probably should), feel free to do so using the --symbols argument:

$ hows-the-market --symbols BRK-B,V,^VIX,WM,XAW.TO  

Custom symbols output

Note: hows-the-market uses Yahoo! Finance under-the-hood, so you'll need to make sure your symbols are consistent with theirs. For most US stocks the symbol is exactly what you'd expect, however for indices and OTC stocks you'll want to grab the symbol from the Yahoo! URL or beside the name like so:

How to grab special symbols from Yahoo! Finance

Other Options

--percent:

Using the --percent flag will display the percentage increase/decrease of each symbol during the current trading period.

$ hows-the-market --percent
S&P 500:
  $2719.71 -> $2729.09 (0.34%)
DOW:
  $24752.40 -> $24803.78 (0.21%)
NASDAQ:
  $7379.58 -> $7417.22 (0.51%)

 ๐Ÿ“ˆ  ๐Ÿค‘ 

--time:

Using the --time flag will display the market time when prices were last loaded, which is usually the current time for US stocks and up to twenty minutes delayed for OTC during market hours:

$ hows-the-market --time --symbols SHOP.TO,NTDOY,V
SHOP.TO:
  $182.00 -> $185.05 
  Jan 2, 2018 at 9:33:40am EDT
NTDOY:
  $52.41 -> $52.59 
  Jan 2, 2018 at 9:38:36am EDT
V:
  $130.58 -> $130.52 
  Jan 2, 2018 at 9:48:09am EDT

 ๐Ÿ“ˆ  ๐Ÿ˜‚ 

Disclaimer

hows-the-market uses the Yahoo! Finance API, which is known to be unstable with breaking changes introduced without notice, and is not officially supported for external use, so use at your own risk. Oh, it's likely also against their Terms of Service, so consider yourself warned.

License

hows-the-market is made available under the MIT License.

hows-the-market's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

thoth87

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.