@marchsabino/stock-js
Grabs information about a stock from Yahoo! Finance.
Last updated 2 years ago by marchsabino .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @marchsabino/stock-js 
SYNC missed versions from official npm registry.

Stock.js

Grabs information about a stock from Yahoo! Finance.

Installation

  • NPM - Coming soon to NPM
  • GitHub - git clone https://github.com/marchsabino/stock.js

Basic Usage:

const Stock = require('stock-js');

let facebook = new Stock('fb');

facebook.data()
  .then((data) => console.log(data))
  .catch((err) => console.log(err));

Example Output:

{ sourceInterval: 15,
  quoteSourceName: 'Nasdaq Real Time Price',
  regularMarketOpen: { raw: 179.9, fmt: '179.9000' },
  exchange: 'NMS',
  regularMarketTime: { raw: 1519415510, fmt: '2:51PM EST' },
  sharesOutstanding: { raw: 2395919872, fmt: '2.396B', longFmt: '2,395,919,872' },
  regularMarketDayHigh: { raw: 182.79, fmt: '182.7900' },
  shortName: 'Facebook, Inc.',
  longName: 'Facebook, Inc.',
  exchangeTimezoneName: 'America/New_York',
  regularMarketChange: { raw: 3.7610931, fmt: '3.7611' },
  regularMarketPreviousClose: { raw: 178.99, fmt: '178.9900' },
  fiftyTwoWeekHighChange: { raw: -12.568909, fmt: '-12.57' },
  exchangeTimezoneShortName: 'EST',
  fiftyTwoWeekLowChange: { raw: 48.591095, fmt: '48.59' },
  exchangeDataDelayedBy: 0,
  regularMarketDayLow: { raw: 179.51, fmt: '179.5100' },
  priceHint: 4,
  currency: 'USD',
  regularMarketPrice: { raw: 182.7511, fmt: '182.7511' },
  regularMarketVolume: { raw: 13285963, fmt: '13.286M', longFmt: '13,285,963' },
  isLoading: false,
  gmtOffSetMilliseconds: -18000000,
  marketState: 'REGULAR',
  marketCap: 
   { raw: 530891931648,
     fmt: '530.892B',
     longFmt: '530,891,931,648' },
  quoteType: 'EQUITY',
  invalid: false,
  symbol: 'FB',
  language: 'en-US',
  fiftyTwoWeekLowChangePercent: { raw: 0.36218765, fmt: '36.22%' },
  messageBoardId: 'finmb_20765463',
  fiftyTwoWeekHigh: { raw: 195.32, fmt: '195.3200' },
  fiftyTwoWeekHighChangePercent: { raw: -0.06435034, fmt: '-6.44%' },
  uuid: '30781f1f-c2f9-342c-ab1a-d2f6f35a51db',
  market: 'us_market',
  fiftyTwoWeekLow: { raw: 134.16, fmt: '134.1600' },
  regularMarketChangePercent: { raw: 2.1012866, fmt: '2.1013%' },
  fullExchangeName: 'NasdaqGS',
  tradeable: true }

License

Copyright © 2018 Marcello Sabino (marchsabino@gmail.com) and released under the MIT License.

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |