![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
yahoo-finance-data
Advanced tools
A node wrapper to call the various Yahoo! Finance API's.
Some services have been deprecated by Yahoo! as of May 18th, 2017. Please see API docs below.
This module requires a Yahoo! API key. More info here.
npm install yahoo-finance-data
const YahooFinanceAPI = require('yahoo-finance-data');
const api = new YahooFinanceAPI({
key: 'mylongyahooapikey',
secret: 'mylongyahooapisecret'
});
DEPRECATED AS OF 3.2
Retrieves realtime quote data for one or more securities.
Param | Type | Desc |
---|---|---|
symbolList | String | the ticker list, comma-separated |
api
.getRealtimeQuotes('YHOO,MSFT,AAPL')
.then(data => console.log(data))
.catch(err => console.log(err));
UPDATED IN v3!
Retrieves historical data for a given security.
Param | Type | Desc |
---|---|---|
symbol | String | the ticker |
interval | String | OPTIONAL interval between data points (default: 1d) |
range | String | OPTIONAL data range (default: 1y) |
Valid ranges:
["1d","5d","1mo","3mo","6mo","1y","2y","5y","10y","ytd","max"]
api
.getHistoricalData('AAPL', '1d', '1y')
.then(data => console.log(data))
.catch(err => console.log(err));
UPDATED IN v3.2 !
Retrieves forex data for one or multiple currency pairs.
Param | Type | Desc |
---|---|---|
exchanges | String | the list of currency pairs, comma-separated |
api
.getForexData('eurusd,gbpusd,cadusd')
.then(data => console.log(data))
.catch(err => console.log(err));
Retrieves news headlines for a given security.
Param | Type | Desc |
---|---|---|
ticker | String | the ticker |
api
.getHeadlinesByTicker('AAPL')
.then(data => console.log(data))
.catch(err => console.log(err));
UPDATED IN v3!
Retrieves intraday chart data for a given security.
Param | Type | Desc |
---|---|---|
ticker | String | the ticker |
interval | String | OPTIONAL time interval for data points (default: 2m) |
prePostData | Boolean | OPTIONAL add pre/post data (default: true) |
api
.getIntradayChartData('AAPL', '2m', true)
.then(data => console.log(data))
.catch(err => console.log(err));
Retrieves matches for a given search term.
Param | Type | Desc |
---|---|---|
searchTerm | String | the search query |
region | String | OPTIONAL the region (default: US) |
lang | String | OPTIONAL the language (default: en-US) |
api
.tickerSearch('Apple Inc.', 'US', 'en-US')
.then(data => console.log(data))
.catch(err => console.log(err));
NEW IN v3!
Retrieves company information based on its ticker.
Param | Type | Desc |
---|---|---|
ticker | String | the ticker |
api
.quoteSummary('AAPL')
.then(data => console.log(data))
.catch(err => console.log(err));
NEW IN v3!
Retrieves option chain for a given ticker.
Param | Type | Desc |
---|---|---|
ticker | String | the ticker |
api
.optionChain('AAPL')
.then(data => console.log(data))
.catch(err => console.log(err));
NEW IN v3!
Retrieves securities recommendations based on a given ticker.
Param | Type | Desc |
---|---|---|
ticker | String | the ticker |
api
.recommendations('AAPL')
.then(data => console.log(data))
.catch(err => console.log(err));
NEW in v3.1!
Retrieves futures data for a given market.
Param | Type | Desc |
---|---|---|
market | String | the market symbol |
range | String | OPTIONAL the amount of days (default: 5d) |
interval | String | OPTIONAL time interval for data points (default: 1d) |
prePostData | Boolean | OPTIONAL add pre/post data (default: false) |
api
.futures('NQ=F')
.then(data => console.log(data))
.catch(err => console.log(err));
NEW in v3.1!
Retrieves one or more commodities futures data.
Param | Type | Desc |
---|---|---|
commodities | String | the list of commodities (comma-separated) |
range | String | OPTIONAL the amount of days (default: 1d) |
interval | String | OPTIONAL time interval for data points (default: 5m) |
prePostData | Boolean | OPTIONAL add pre/post data (default: false) |
api
.commodities('GC=F,SI=F,PL=F,HG=F')
.then(data => console.log(data))
.catch(err => console.log(err));
FAQs
A node wrapper to call the various yahoo finance API's
The npm package yahoo-finance-data receives a total of 0 weekly downloads. As such, yahoo-finance-data popularity was classified as not popular.
We found that yahoo-finance-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.