1.4.1 • Published 3 years ago

yahoo-earnings v1.4.1

Weekly downloads
172
License
MIT
Repository
github
Last release
3 years ago

Yahoo Finance Earnings Calendar

npm version npm downloads

Node library. Scrapes yahoo finance earnings calendar from a given date.

Need to improve

  • Build and publish in CI
  • Optimise getEarningsByInterval to open browser only one time
  • Add more tests

Installation

npm install yahoo-earnings
yarn install yahoo-earnings

Usage

By day

import { YahooFinanceEarnings } from 'yahoo-earnings';

const earnings = await YahooFinanceEarnings.getEarningsByDay(
  new Date('2020-06-16'),
); // default new Date()
console.log(earnings);
// Upcoming Earning
[
  {
    epsEstimate: 1.17,
    epsReported: undefined,
    epsSurprise: undefined,
    reportDate: '2020-06-16',
    symbol: 'ORCL',
    company: 'Oracle Corp',
    announceTime: 'After Market Close',
    epsSurpriseDollar: undefined,
  },
][
  // Previous Earning
  {
    epsEstimate: 2.33,
    epsReported: 2.45,
    epsSurprise: 5.15,
    reportDate: '2020-06-11',
    symbol: 'ADBE',
    company: 'Adobe Inc.',
    announceTime: 'Time Not Supplied',
    epsSurpriseDollar: 0.12,
  }
  ];

By date range

import { YahooFinanceEarnings } from 'yahoo-earnings';

const earnings = await YahooFinanceEarnings.getEarningsByInterval(
  new Date('2020-06-14'),  // default new Date()
  new Date('2020-06-17'),  // default new Date()
  {
    requestsTimeoutMs: 2000,  // Optional, default 1000.
    groupByDay: false,  // Optional, default false.
  }
);
console.log(earnings);
// Upcoming Earning
[{ ... }, { ... }];

License

MIT

1.4.1

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago