Is there a REST API that I could use to retrieve daily EPS Trailing 5 years of a company?
Hi,
You can use the following:
import refinitiv.data as rd...rd.get_data( universe=['AAPL.O'], fields=['TR.EPSMean', 'TR.EPSMean.date'], parameters={'SDate':0, 'EDate':-4, 'Frq':'FY'})
Thanks. How can I get this data using DataScope API?
Also is it possible to retrieve this data from datastream api?
@vishal.kak
I found some EPS fields in the DataScope Corporate Actions report template.
You can check all available fields and their descriptions in the Refinitiv DataScope Select Data Content Guide.
I tested it with the following request.
{ "ExtractionRequest": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.CorporateActionsStandardExtractionRequest", "ContentFieldNames": [ "Corporate Actions Type", "Adjusted EPS Amount", "EPS Amount", "Earnings Announcement Date", "Period End Date", "EPS Basis Number of Shares", "EPS Calculation Basis", "EPS Currency", "EPS General Marker", "EPS General Marker Description", "EPS Is Audited", "EPS Net/Gross Marker", "EPS Net/Gross Marker Description" ], "IdentifierList": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": "AAPL.O", "IdentifierType": "Ric" } ] }, "Condition": { "ReportDateRangeType": "Range", "QueryStartDate": "2018-01-01", "QueryEndDate": "2023-01-20", "ExcludeDeletedEvents": false, "IncludeCapitalChangeEvents": false, "IncludeDividendEvents": false, "IncludeEarningsEvents": true, "IncludeMergersAndAcquisitionsEvents": false, "IncludeNominalValueEvents": false, "IncludePublicEquityOfferingsEvents": false, "IncludeSharesOutstandingEvents": false, "IncludeVotingRightsEvents": false, "CorporateActionsEarningsType": "EarningsAnnouncementDate", "ShareAmountTypes": [] } }}
The output looks like this:
"Contents": [ { "IdentifierType": "Ric", "Identifier": "AAPL.O", "Corporate Actions Type": "EAR", "Adjusted EPS Amount": 0.6384675, "EPS Amount": 2.55387, "Earnings Announcement Date": "2020-04-30", "Period End Date": "2020-03-28", "EPS Basis Number of Shares": 4404691000, "EPS Calculation Basis": "WAV", "EPS Currency": "USD", "EPS General Marker": 80, "EPS General Marker Description": "Consolidated fully diluted earnings;interim before extraordi", "EPS Is Audited": "n", "EPS Net/Gross Marker": 2, "EPS Net/Gross Marker Description": "Net" }, { "IdentifierType": "Ric", "Identifier": "AAPL.O", "Corporate Actions Type": "EAR", "Adjusted EPS Amount": 2.5324025, "EPS Amount": 10.12961, "Earnings Announcement Date": "2020-07-30", "Period End Date": "2020-06-27", "EPS Basis Number of Shares": null, "EPS Calculation Basis": "WAV", "EPS Currency": "USD", "EPS General Marker": 80, "EPS General Marker Description": "Consolidated fully diluted earnings;interim before extraordi", "EPS Is Audited": "n", "EPS Net/Gross Marker": 2, "EPS Net/Gross Marker Description": "Net" }, { "IdentifierType": "Ric", "Identifier": "AAPL.O", "Corporate Actions Type": "EAR", "Adjusted EPS Amount": 0.6460125, "EPS Amount": 2.58405, "Earnings Announcement Date": "2020-07-30", "Period End Date": "2020-06-27", "EPS Basis Number of Shares": 4354788000, "EPS Calculation Basis": "WAV", "EPS Currency": "USD", "EPS General Marker": 80, "EPS General Marker Description": "Consolidated fully diluted earnings;interim before extraordi", "EPS Is Audited": "n", "EPS Net/Gross Marker": 2, "EPS Net/Gross Marker Description": "Net" },...
You can refer to the REST API Reference Tree for all parameters of the CorporateActionsStandardExtractionRequest.
Otherwise, if you have any further questions regarding the retrieved content, please contact the Datascope Select support team directly via MyRefinitiv.
For the Datastream Webservice, you can use the Datastream Navigator to search for data types or fields.
Then, you can use these data types with the Datastream Webservice to retrieve the data.
For example:
df = ds.get_data(tickers='U:IBM', fields= ['EPS1TR12','EPS'],kind=1,start='-5Y', freq='Y')df
The output is:
I am using DatastreamPy to retrieve the data.
Thanks you, very useful.
Is this data store in TQA database as well? If yes, can you send me table name and column?
read store as stored
You need to use the Datastream Navigator to search for data types or fields, as mentioned in the answer below.
Otherwise, you can contact the DataStream Webservice support team directly via MyRefinitiv to check the data types for you.
Sorry. I am not familiar with the TQA database. You need to contact your Refinitiv Account team or Sales team to verify this.