A promise-based Node.js wrapper for the Yahoo Finance API allowing to get realtime quote, h...

Datetime:2016-08-23 05:18:43          Topic: Node.js           Share

yahoo-finance

a node wrapper to call the various yahoo finance apis

Install

npm install yahoo-finance-data

Getting started

var YahooFinanceAPI = require('yahoo-finance-data');

var api = new YahooFinanceAPI();

Get Headlines

You can get news headlines for multiple tickers.

api
  .getHeadlines('AAPL,YHOO,MSFT')
  .then(function(res) {
    console.log("HEADLINES ?", res.headlines);
  })

Get quote

api
  .getQuote('AAPL')
  .then(function(res) {
    console.log("QUOTE ?", res.quote);
  });

Historical Data

api.
  getHistoricalData('AAPL', '2016-01-01', '2016-02-01')
  .then(function(res) {
    console.log("DATA ?", res.data);
  });

Ticker Search

api.
  ticker('Apple')
  .then(function(res) {
    console.log("TICKER ?", res.search, res.results);
  });




About List