Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
yahoo-finance2
Advanced tools
Community API for Yahoo-Finance.
Copyright (c) 2021 by Gadi Cohen <dragon@wastelands.net>. MIT licensed.
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.
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.
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
,
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
, with more
coming soon.
See the Full Documentation.
Working with yahoo-finance2
is a joy if you're using TypeScript (but you
don't have to), with type checking and auto completion:
Try it yourself on our Live CodeSandbox.
In "devel" mode, any URL will only be fetched once and cached in memory and on the disk. All future requests (for the rest of time) will return the cached result. This is very helpful to speed up development and is used extensively for our tests.
await search('AAPL', {}, { devel: true }); // uses sha1 from URL
await search('AAPL', {}, { devel: 'search-AAPL.json' }); // fixed filename
Note: require('yahooFinanceFetchDevel')
is called conditionally when
devel: true
. It also uses packages from devDependencies
. As such,
deployment to production is not supported.
Pull Requests welcome! Please read CONTRIBUTING.md to avoid friction :) Mostly importantly, PRs should be submitted against the devel branch (our default branch) and commit messages should follow the conventionalcommits standard (basically Angular). This is important as we use semantic-release to automate releases and CHANGELOG entries when we merge back to master.
FAQs
JS API for Yahoo Finance
The npm package yahoo-finance2 receives a total of 4,228 weekly downloads. As such, yahoo-finance2 popularity was classified as popular.
We found that yahoo-finance2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.