Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by CSI · Oct 26, 2019 at 04:56 PM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonapi-limitserror-message

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

Hello,

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:    
    print(err)

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.

Thanks!

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Jirapongse · Oct 31, 2019 at 04:08 AM

@CSI

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)
Comment
CSI

People who like this

1 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
CSI · Oct 31, 2019 at 02:01 PM 0
Share

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.

avatar image
REFINITIV
Jirapongse ♦♦ CSI · Nov 01, 2019 at 03:06 AM 0
Share

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

avatar image
REFINITIV
Answer by pimchaya.wongrukun01 · Oct 28, 2019 at 01:04 AM

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.

Comment
CSI

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
CSI · Oct 28, 2019 at 09:28 AM 0
Share

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.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

API Not Returning Full Set of Results from Code

Limit on tick history in python API

How to get all investors for a list of stocks, historically with the python API

Error Code 101 : MacOs

In Phython, How many RICs data can be snap at one time? I tried to snap for only 2 FIDs, but I am unable to snap more than 7500 RICs. So is it the limit and if not, how it can be increase?

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges