question

Upvotes
Accepted
27 1 1 6

Python API - Error retrieving Fundamental data via get_history - Temporary data retrieval issue

I am extracting fundamental data and am receiving random errors on a large number of instruments (>2000 items) error: "Unable to resolve and collect data for all requested identifiers and fields". Even though the refinitiv workspace tells me it’s a "temporary" issue, over a week or so attempting it multiple times I always get this error. What is going on?


The breakdown of the problem, highlights a) the python code and error, b) the workspace and c) a selection of these instruments for which this counts.


A) Simplified code and error

The simplified code that I am following is as follows:


import lseg.data as ld
from lseg.data.content._header_type import HeaderType

ld.open_session()

parameters =  {   
    "SDate": '-30Y',  
    "EDate": '-1d',
    
    "FRQ": "FY", # frequency, full year
    "Curn": "EUR",
    "Scale": 3, 
}

fundamental_df = ld.get_history(universe=['5000678616'], 
                                fields="TR.F.TotRevenue", 
                                header_type=HeaderType.NAME,
                                interval="1Y",
                                parameters = parameters)

ld.close_session()


The error:

Unable to resolve and collect data for all requested identifiers and fields. Requested universes: ['5000678616']. Requested fields: ['TR.F.TOTREVENUE']



B) Workspace

If you go into the workspace, you retrieve the error "Temporary data retrieval issue, please try again". See screenshot. This seems to suggest that it’s a temporary issue, and I must try again. However, running the code over a period of multiple days and weeks this seems to persist.

screenshot-2024-10-10-at-082436.png


C) Example instruments.

I can provide you a list of over 2000 items with this error, a small random selection of these items are the following with which you can test.

5000678616
4295909227
4295917510
5082539508
5050267279
5067486052
5084951620
5054881763
4296378835
4296137840
5037016660


Thanks

python#contentpython apilseg-data-library
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.

1 Answer

· Write an Answer
Upvotes
Accepted
7.3k 18 2 8

Hi @r.fernandez ,


I checked some of the ids you have above, and it doesn't seem we have TR.F.TotRevenue data for those Private/Delisted companies. If you check them in Workspace Data Item Browser, you will see no data is returned there. See an example for4296378835:

screenshot-2024-10-14-at-101136.png

This suggests that the issue is not related to the library but rather to the content. To learn why no data is retrieved for those companies (I am assuming that is because these are private/delisted ones) I would advice raising a content query via Helpdesk.


Hope this helps.


Best regards,

Haykaz


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.

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.