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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles


21 1 1 5

get_data: How to automatically check if all data was properly returned?


I am accessing the Eikon API via Python to pull some data on fund holdings. Does the "err" part that get_data returns contain any information whether all requested data was properly returned?

For example, it could theoretically be the case that some call limit is binding and not all data is returned. Would such a case be indicated by "err", and if so how?

Right now I have the following line just to get an idea which kinds of errors are returned:

data , err = ek.get_data(fundidentifiers[i:i+9], ['TR.FundHoldingRIC','TR.FundHoldingName','TR.FundPercentageOfFundAssets','TR.FundNumberOfShares','TR.FundNumberOfSharesChanged','TR.FundAllocationDate'],{'Endnum':'100'})

if err is not None:    

The only errors I got were "[{'code': 416, 'col': 1, 'message': "Unable to collect data for the field 'TR.FundHoldingRIC' and some specific identifier(s).", 'row': 41}, ...", which I think are fine because not all funds have 100 items (or even any items) in their portfolio and I think this is what this error indicates. But nothing that would indicate some call limit.

Ideally, I would like to add an if-condition that soudns the alarm if not all data was properly returned, so that I can get it later. Otherwise I would miss this and build an incomplete data set.


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.

52.5k 134 44 63


When requesting the data, we should know the number of rows and columns in the returned data frame or the start date or end date in the data frame.

Therefore, we can initially check if all data was properly returned by using the number of rows and columns in the data frame.

For example, the following code uses the get_data method to retrieve three fields of three items. Therefore, the number of rows is the number of items (3) and the number of columns is 4 which are the number of fields including the instrument column.

Currently, there is no method call to check data usage. However, you can verify it from the log file as mentioned on this thread.

1572494618022.png (33.2 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.

Thank you, yes it seems the log would do what I am asking for (though I would have preferred to do this entirely in python).

The suggestion concerning the data format makes sense in general, though in my specific case it is not always helpful because not all funds have 100 items in their portfolio, so get_data would not return 100 rows even if no data limit was binding. Still, this seems like the best python option.

For the future, I suppose someone could suggest to the Eikon API developers to add an error code to the get_data function that specifies whether any data limit caused it to return incomplete data.

Thank you for feedback. I will forward it to the product manager for further consideration.

9.6k 10 6 7

Hello @CSI

Please see in Eikon Data API Usage and Limits Guideline , it shows the detailed limits including call limit and what happened when a limit is reached.

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.

Dear Pimchaya, thank you for your answer. I am aware of this document, but since my university's Eikon license is shared, I would not know whether somebody else's behavior for example exhausted the daily usage limit. This is why I am asking whether the Eikon API would directly tell me whether any limit was reached, because as this document states, it would not result in an error but in truncation of the returned data. Thanks.