node-financial-data
v1.1.13
Published
Node.js module for accessing real time financial/stock data.
Downloads
4
Maintainers
Readme
Node-Financial-Data
Node.js module for accessing real time financial/stock data.
Installation
$ npm install node-financial-data
Usage
var finance = require('node-financial-data');
Get the current stock price
finance.price('AAPL', function (err, data) {
// 100.00
});
Get historical data for a given stock
// args
// 1. Ticker symbol
// 2. Desired Value ['high', 'low', 'open', 'close', 'volume']
// 3. Start Date
// 4. End Date
// 5. Interval ["1d","5d","1mo","3mo","6mo","1y","2y","5y","10y","ytd","max"]
finance.history('AAPL', 'close', "2020-11-01", "2020-11-08", '1d', function (err, data) {
// [
// 101.7699966430664,
// 102.44000244140625,
// 103.94999694824219,
// 104.02999877929688,
// 105.69000244140625
// ]
});
Documentation
Choose from a wide range of available financial data to best fit your needs
finance.analystRecomendation(ticker, callback)
finance.assetType(ticker, callback)
finance.companyName(ticker, callback)
finance.dividendRate(ticker, callback)
finance.dividendYield(ticker, callback)
finance.earningsGrowth(ticker, callback)
finance.exchange(ticker, callback)
finance.fiftyDayAverage(ticker, callback)
finance.fiftyTwoWeekHigh(ticker, callback)
finance.fiftyTwoWeekLow(ticker, callback)
finance.fiveYearAvgDividendYield(ticker, callback)
finance.forwardPE(ticker, callback)
finance.freeCashflow(ticker, callback)
finance.grossMargins(ticker, callback)
finance.grossProfits(ticker, callback)
finance.history(ticker, callback)
finance.marketCap(ticker, callback)
finance.marketState(ticker, callback)
finance.numberOfAnalystOpinions(ticker, callback)
finance.operatingCashflow(ticker, callback)
finance.operatingMargins(ticker, callback)
finance.postMarketPrice(ticker, callback)
finance.preMarketPrice(ticker, callback)
finance.price(ticker, callback)
finance.priceToBook(ticker, callback)
finance.profitMargins(ticker, callback)
finance.returnOnAssets(ticker, callback)
finance.returnOnEquity(ticker, callback)
finance.revenueGrowth(ticker, callback)
finance.revenuePerShare(ticker, callback)
finance.targetHighPrice(ticker, callback)
finance.targetLowPrice(ticker, callback)
finance.targetMeanPrice(ticker, callback)
finance.targetMedianPrice(ticker, callback)
finance.totalCash(ticker, callback)
finance.totalCashPerShare(ticker, callback)
finance.totalDebt(ticker, callback)
finance.totalRevenue(ticker, callback)
finance.trailingPE(ticker, callback)
finance.twoHundredDayAverage(ticker, callback)
finance.volume(ticker, callback)
Crypto prices also available
finance.price('BTC-USD', function (err, data) {
// 40000.00
});
// BTC-USD
// ETH-USD
// LTC-USD
// DOGE-USD