0

The documentation says you can get data for the four most recent earnings reports, but when I used the code below, it only returned data for one period. How can I get the data for four periods?

import pyEX as p
p.stocks.earningsDF('FB', token='myAPIToken', version='v1', filter='')

The output is below:

{'symbol': 'FB',
 'earnings': [{'actualEPS': 2.12,
   'consensusEPS': 1.91,
   'announceTime': 'AMC',
   'numberOfEstimates': 42,
   'EPSSurpriseDollar': 0.21,
   'EPSReportDate': '2019-10-30',
   'fiscalPeriod': 'Q3 2019',
   'fiscalEndDate': '2019-09-30',
   'yearAgo': 1.76,
   'yearAgoChangePercent': 0.2045}]}
realr
  • 3,652
  • 6
  • 23
  • 34
  • 1
    Did you already check out the `filter` documentation at https://iexcloud.io/docs/api/#filter-results? – Jongware Jan 20 '20 at 22:12
  • It describes how to further filter the returned results (i.e. return only the EPSReportDate) but I can't find anything about getting the earnings data for previous earnings periods. – Dennis O'Leary Jan 21 '20 at 02:27

0 Answers0