Giter VIP home page Giter VIP logo

nodejs-stock-info's Introduction

NodeJS Stock Info

Build Status Known Vulnerabilities codecov license: MIT Maintainability npm version

A minimal NodeJS library to fetch stock info.

Disclaimer: This package fetch the result from finance.yahoo.com using web scrapping. Owner will not be responsible for any misuse of this package. This is solely for the purpose of learning.

Getting started

Installation

This package can be installed using npm

npm install nodejs-stock-info

or, yarn

yarn add nodejs-stock-info

Usage

Import stock-info.

const SI = require('nodejs-stock-info')

Then instantiate with either the empty constructor

let stockInfo = new SI()

Or, with a string or list of strings corresponding to the stock e.g. "amzn" or ["amzn", "aapl"]

let stockInfo = new SI("amzn")
// or
let stockInfo = new SI(["amzn", "aapl"])

The getStockInfo method will return the latest stock information and can be used as a promise.

stockInfo.getStockInfo().then((response) => {
    console.log(response) //or do something else
})

Chaining is also supported.

stockInfo.setStocks("tsla").getStockInfo().then((response) => {
    console.log(response) //or do something else
})

Issues

If any issues are found, they can be reported here.

License

This project is licensed under the MIT license.

nodejs-stock-info's People

Contributors

paul-shuvo 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.