Code Monkey home page Code Monkey logo

quotr's Introduction

Quotr

Quotr is a Node.js CLI for getting near real-time stock quotes from Yahoo Finance. It works for pretty much every relevant ticker in the world (currently 26.626 symbols across the globe). The delay depends on the Yahoo's data provider. Normally it's 15 minutes. You can check the list of exchanges and their corresponding delays here.

Installing

Make sure you have Node.js installed, then... (you'll need sudo on linux boxes)

npm install -g quotr

Using

Open the terminal (or command prompt on Windows) and type:

quotr

Now you've entered the quotr shell.

For getting all available commands:

help

For getting help for a specific command:

<command> /?

Now you can start entering commands...

Commands

symbol-search (short: ss)

Searchs for ticker symbols that match the given criteria. Example:

ss apple

image

snapshot (short: s)

Displays the latest information about the given symbol. Example:

s aapl

image

Optionally, you can pass fields in using the -f parameter. Example:

s aapl -f v (displays the volume)

image

Now it would be helpful to know the available fields for the s command...

field-list (short: f)

Displays or searches for the available snapshot fields. Examples:

f (displays all fields)
f -s average (displays all fields that match `average`)

image

history (short: h)

Displays the history for a given symbol. Examples:

h aapl (displays the last 10 days history of the `aapl` symbol, which is the default in case no interval is specified)
h aapl -l 60 (displays the last 60 days history for the `aapl` symbol)
h aapl -f 2015-10-01 -t 2015-10-30 (displays the history for the `aapl` symbol from 2015-10-01 to 2015-10-30)

Currently, the history command does not take into account the current day until it's closed.

image

variation (short: v)

Displays the variation of the given symbol. Examples:

v aapl (displays the last 10 days variation of the `aapl` symbol, which is the default in case no interval is specified)
v aapl -l 60 (displays the last 60 days variation for the `aapl` symbol)
v aapl -f 2015-10-01 -t 2015-10-30 (displays the varoatopm for the `aapl` symbol from 2015-10-01 to 2015-10-30)

Currently, the variation command does not take into account the current day until it's closed.

image

License

MIT.

Third Party

quotr's People

Contributors

andrerpena avatar kant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quotr's Issues

Non interactive use

Just downloaded and played around with this a bit, it is really nicely done! I am wondering if you are planning on addressing non interactive use? Namely being able to run the quotr commands from my bash shell and having the result come back to me in stdout would be amazing!

Thanks for contributing this!

Many fields return null, multiple options is confusing, no "all" option

Hello,

Finding the module pretty nice so far, but getting the data I want is a bit of a pain in the arse at the moment to be frank.

When I look at a share from yahoo finance, I can see lots of details: http://finance.yahoo.com/quote/FLO.L/key-statistics?p=FLO.L for example, which shows shares outstanding. However, in quotr, it returns nothing at all:

quotr$ s flo.l -f j2
field                           flo.l                                     
------------------------------  ----------------------------------------  
symbol                          flo.l  

Other things return null:

quotr$ s flo.l -f m2
field                           flo.l                                     
------------------------------  ----------------------------------------  
symbol                          flo.l                                     
daysRangeRealtime               null                                      

Multiple -f flags causes it to exit with a big sad face:

quotr$ s -f j2 -f e flo.l
readline.js:925
            throw err;
            ^

TypeError: args.options.fields.split is not a function

Space separated arguments ignores any subsequent arguments, and if placed before the symbol, makes it think that is the symbol and explodes even more:

quotr$ s flo.l -f m2 m3
field                           flo.l                                     
------------------------------  ----------------------------------------  
symbol                          flo.l                                     
daysRangeRealtime               null                                      
quotr$ s -f m2 m3 flo.l
field                           m3                                        
------------------------------  ----------------------------------------  
symbol                          m3                                        
daysRangeRealtime               null  

This random series of character comes up with a broken result/non-informative error:

quotr$ s flo.l -f gdfgdfg
error: Error: Failed to download data (CSV column mis-alignment error)

These non-comma-separated filters cause it to explode:

quotr$ s flo.l -f vxn
/usr/local/lib/node_modules/quotr/node_modules/bluebird/js/release/async.js:61
        fn = function () { throw arg; };
                           ^
TypeError: Cannot convert undefined or null to object

But also quite importantly, I'd like just a s symbol -f all type thing, which also filters out blank and null values. Just whatever is available.

Also, just the symbol name by itself should be enough rather than having to use s symbol.

Not sure what your thoughts on any of these points are?

Cheers!
Matt

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.