Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
9 1 8 13

Daily EPS Trailing 5 years of a company using REST API

Is there a REST API that I could use to retrieve daily EPS Trailing 5 years of a company?

#technologyapi#contentdsws-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Jirapongse Could you please take a look as client has further questions.

Hi @vishal.kak ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Upvote
Accepted
17.3k 82 39 63

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'}
)

ahs.png


ahs.png (21.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
9 1 8 13

Thanks. How can I get this data using DataScope API?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
9 1 8 13

Also is it possible to retrieve this data from datastream api?


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
79.1k 250 52 74

@vishal.kak

I found some EPS fields in the DataScope Corporate Actions report template.

1674724682119.png

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.


1674724682119.png (13.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
79.1k 250 52 74

@vishal.kak

For the Datastream Webservice, you can use the Datastream Navigator to search for data types or fields.

1674726233174.png

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:

1674726325734.png

I am using DatastreamPy to retrieve the data.


1674726233174.png (53.4 KiB)
1674726325734.png (22.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
9 1 8 13

Thanks you, very useful.

Is this data store in TQA database as well? If yes, can you send me table name and column?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@vishal.kak

Sorry. I am not familiar with the TQA database. You need to contact your Refinitiv Account team or Sales team to verify this.

Upvotes
9 1 8 13

read store as stored

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

Also is it possible to retrieve this data from datastream api?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.




Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.