2.0.4 • Published 6 years ago

yahoo-stocks v2.0.4

Weekly downloads
30
License
MIT
Repository
github
Last release
6 years ago

yahoo-stocks

Travis Coveralls branch license

Fetch stock data from Yahoo! Finance

Install

$ npm install --save yahoo-stocks

Usage

import { lookup, history } from 'yahoo-stocks';

lookup('AAPL').then(response => {
    console.log(response);
});

history('AAPL').then(response => {
    console.log(response);
});

API

lookup(symbol)

Returns a Promise that resolves the data for the symbol.

symbol

Type: String

The stock symbol.

history(symbol, options)

Returns a Promise that resolves the price history for the symbol.

symbol

Type: String

The stock symbol.

options

Type: Object

A dictionary of customizable options

  • interval - Set the interval for the price changes, e.g. 1m, 1d, 5d, 1mo, 1y.
  • range - Set the range of dates to include in the output, value values are: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max

License

MIT © Vu Tran

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago

0.0.0

7 years ago