Code Monkey home page Code Monkey logo

stock-alert's Introduction

stock-alert

A Node API (and a CLI) for Live notification on NIFTY, SENSEX, NASDAQ, DOWJONES Indices.

Installation

npm install -g stock-alert

Usage

  • Command Line Interface
stock-alert <command>
Examples:

$ stock-alert desktop # for desktop notification for nifty

$ stock-alert dow # for DOWJONES
$ stock-alert nasdaq # for NASDAQ
$ stock-alert sensex # for SENSEX
$ stock-alert nifty # for NIFTY
$ stock-alert # default will give results on cli for exchanges 

$ stock-alert help # show this help msg
  • API
const stockAlert = require("stock-alert)
/*
Available exchanges : NIFTY, SENSEX, DOWJONES, NASDAQ
*/

stockAlert("NIFTY).then(resp => {
    console.log(resp.data);
    /*
        {   
            HIGH: '8575.45',
            decl: 42,
            ty: '5',
            '1mthCh': '-3523.700',
            HN: null,
            cl1wDt: '2020-03-13',
            cl5yDt: '2015-03-19',
            YTD: -32.09118663428785,
            cl5yPerChange: '-4.3000',
            cl1yPerChange: '-28.3500',
            cl3yVal: '9126.85',
            '1yr': '-26.100',
            cl3mVal: '12262.75',
            '3yr': '-7.200',
            ...
            ...
            ...
        }
    */
});

Tip

  • You can create a cronjob like this:
$ which stock-alert # it will give path of the executable file
$ crontab -e # command for opening crontab config
# m     h        dom    mon      dow        commmand
  */30  10-15     *      *       1-5    /path/to/stock-alert nifty desktop

# run in every thirty mintute b/w 10am to 3pm from monday to friday

Demo

snap

License

MIT

stock-alert's People

Contributors

dependabot[bot] avatar prdpx7 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.