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

yahoo-finance-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yahoo-finance-wrapper

wrapper for the yahoo finance stockAPI that I created

  • 1.0.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-91.67%
Maintainers
1
Weekly downloads
 
Created
Source

yahoo-finance-wrapper

API wrapper for https://github.com/maddaxlallatin/stockAPI, an UNOFFICAL yahoo finance api

Installation

npm i yahoo-finance-wrapper

Example Usage

//Import the Module
const YahooFinance = require("yahoo-finance-wrapper");

//Create A new stock class
const appleStock = new YahooFinance.Stock("AAPL");
const nvidiaStock = new YahooFinance.Stock("NVDA");

async function getStockInfo() {
    //get the Price of apple stock and print to console
    var applePrice = await appleStock.getPrice();
    console.log(applePrice.price);
    
    //get historical price for the nvidia stock
    console.log(await nvidiaStock.getHistory());
    //get dividends for the nvidia stock
    console.log(await nvidiaStock.getDividends());

    //Get information on stoks that are currently trending
    console.log(await YahooFinance.getTrending());
}

getStockInfo();

Documentation

View the documentation on Github

Keywords

FAQs

Package last updated on 21 Oct 2024

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