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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 0 4 7

API Returns Wrong Data: get_data returns Annual data when 'FRQ': 'FQ' is specified

The Eikon Python API looks awesome and the data available from the data grid looks very extensive which is great.  


Unfortunately, on literally my very first test after installation, I tried to get some quarterly fundamental data, but it seems the API is returning only annualized data when I request quarterly data (duplicating the annual data across quarters) am I missing something here?   It's entirely possible I am doing something wrong but I think the call I'm making is correct:

Here is the API call I'm making.  I've tried versions of this command that only send the paramaters via the field and that only send the parameters via the paramaters option.  They have all consistently returned the same duplicated annualized data as shown:

df, err = ek.get_data(instruments=[ 'AMZN.O' ],
                      fields=[ ('TR.TotalRevenue', {'SDate':0,'EDate':-4,'Period':'FY0','FRQ':'FQ','Scale':6}) ],
                      parameters={'SDate': 0, 'EDate': -4, 'Period': 'FY0', 'FRQ': 'FQ', 'Scale': 6},
                      debug=True )

Debug output is:

Request: {"Entity": {"E": "DataGrid", "W": {"instruments": ["AMZN.O"], "parameters": {"SDate": 0, "Scale": 6, "EDate": -4, "Period": "FY0", "FRQ": "FQ"}, "fields": [{"name": "TR.TotalRevenue", "parameters": {"SDate": 0, "Scale": 6, "EDate": -4, "Period": "FY0", "FRQ": "FQ"}}]}}}


HTTP Response: 200 - {"columnHeadersCount":1,"data":[["AMZN.O",107006],["AMZN.O",107006],["AMZN.O",107006],["AMZN.O",88988],["AMZN.O",88988]],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"Total Revenue","field":"TR.TOTALREVENUE(EDate=-4,FRQ=FQ,Period=FY0,SDate=0,Scale=6)"}]],"rowHeadersCount":1,"totalColumnsCount":2,"totalRowsCount":6}


The weird thing is that it looks like the query is getting sent by the python API properly via the HTTP request as seen in the debug information printed out above but unfortunately the results returned by the API are not correct:


  Instrument  Total Revenue
0     AMZN.O         107006
1     AMZN.O         107006
2     AMZN.O         107006
3     AMZN.O          88988
4     AMZN.O          88988

As you can see, these are clearly not quarterly revenue figures, these are annual revenues somehow duplicated across quarters.   

If you feel the need, you can fact check the revenue numbers on an independent source (marketwatch) just to make sure:

Annual Revenue is the first field (Sales/Revenue):
http://www.marketwatch.com/investing/stock/amzn/financials/income/annual

Quarterly Revenue is the first field (Sales/Revenue):
http://www.marketwatch.com/investing/stock/amzn/financials/income/quarter

Please help, thanks!





eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonfundamental-data
icon clock
10 |1500

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such. Thanks, AHS

Oh, also, I'm running EikonScriptingProxy-0.9.3-linux-x64 if it helps anyone who is looking at this. Thanks

1 Answer

Upvote
Accepted
38.1k 71 35 53

I assume that you want to get these values.

I can get these data after changing Period to FQ0. The following is the result from Eikon Excel.


quarterly.png (5.0 KiB)
eikon.png (14.8 KiB)
icon clock
10 |1500

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

Thank you. The issue was that the Data Item Browser in Eikon web version was telling me to use these values to query - might be something for the Eikon web team to fix -- but thanks for your help. Meant to reply to this sooner but got busy. Thanks

Click below to post an Idea Post Idea