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

yahoo-finance2

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yahoo-finance2

JS API for Yahoo Finance

  • 1.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.8K
increased by21.56%
Maintainers
1
Weekly downloads
 
Created
Source

node-yahoo-finance2

Community API for Yahoo-Finance.

Copyright (c) 2021 by Gadi Cohen <dragon@wastelands.net>. MIT licensed.

npm CircleCI coverage semantic-release TypeScript MIT License

Supports Node 12.0.0 and up (tests are run against 12.0.0).

Beta release. Please let us know of any issues or edge cases. If you're looking for something stable and battle-tested, use the current node-yahoo-finance.

Live Demo on CodeSandbox

Unofficial API

This project is neither created nor endorsed by Yahoo Inc. Yahoo does not provide any official API to developers, nor makes any guarantees regarding service availability or API consistency. In practice however, the open source community has kept this project (and it's predecessor) working well since 2013.

Nevertheless, we make no guarantees and you use this package at your own risk. The developers (and obviously Yahoo) cannot be held responsible for any losses you may incur as a result of using this service. Use of this package is considered acknowledgement and acceptance of these terms and of it's license.

Quickstart

CLI (Command line interface)

$ npx yahoo-finance2 search AAPL

# or install it
$ npm install -g yahoo-finance2
$ yahoo-finance search AAPL '{ "someOption": true }'

Importing

import yahooFinance from 'yahoo-finance2';

const results = await yahooFinance.search('AAPL');
const results = await yahooFInance.search('AAPL', { someOption: true, etc });

Available modules: autoc, historical, quote, quoteSummary (submodules: assetProfile, balanceSheetHistory, balanceSheetHistoryQuarterly, calendarEvents, cashflowStatementHistory, cashflowStatementHistoryQuarterly, defaultKeyStatistics, earnings, earningsHistory, earningsTrend, financialData, fundOwnership, fundPerformance, fundProfile, incomeStatementHistory, incomeStatementHistoryQuarterly, indexTrend, industryTrend, insiderHolders insiderTransactions, institutionOwnership, majorDirectHolders, majorHoldersBreakdown, netSharePurchaseActivity, price, quoteType, recommendationTrend, secFilings, sectorTrend, summaryDetail, summaryProfile, symbol, topHoldings, upgradeDowngradeHistory), search, recommendationsBySymbol, with more coming soon.

See the Full Documentation.

Even Quicker Start - Stock Price

const quote = await yahooFinance.quote('AAPL');
const { regularMarketPrice as price, currency } = quote;

(Optional) TypeScript Love

Working with yahoo-finance2 is a joy if you're using TypeScript (but you don't have to), with type checking and auto completion:

Types Animation

Try it yourself on our Live CodeSandbox.

Contributing

Pull Requests welcome! Please read CONTRIBUTING.md.

Credits

  • Massive thanks to @pilwon for the original node-yahoo-finance and for all our prior collaborations on this and other projects 🙏

Keywords

FAQs

Package last updated on 10 Feb 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