Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodejs-stock-info

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodejs-stock-info

A nodejs library to fetch stock info that doesn't require subscribing to any API calls.

  • 0.1.20
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 21 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc