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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvote
Accepted
38 2 1 2

ek.get_data Problems for 31st December 2021

I have a python script that uses ek.get_data to pull a list of fields for various RICs. This has run fine for a long time now, but when using it for year end (31/12/2021) the majority of dataframes retrieved are filled with <NA>. I have tested the script for other dates and there is no such issue, so was wondering if there is a known problem with Python API data for 31st December.

The fields I am trying to pull are as follows:

['TR.CLOSEPRICE.date', 'TR.PriceCloseDate', 'TR.Volume', 'TR.VWAPVOLUME', 'TR.CLOSEPRICE', 'TR.PriceClose', 'CF_CURR', 'TR.AvgDailyVolume100D', 'TR.Volatility60D','TR.ExchangeCountry','TR.PRICECLOSE.Currency']


1641375121409.png

python api
1641375121409.png (19.7 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
Accepted
25k 87 11 23

Hi @thomas.goodman

I have been advised by the Eikon Data API team that this issue has been fixed and passed their internal testing with 3000 RICS.

Please test and confirm. Thank you for your patience.

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.

Confirmed that this now works.

Thanks for your help.

Upvotes
384 4 2 9

Hi @thomas.goodman ,


If my understanding of the problem is correct, I tried to solve it on my end for the RICs I can see above and there is data for most of them. Please see below the code and the output.

rics = ['1332.T', '1334.T','1514.T', '1605.T', '1662.T', 'ARAL.SI', 'CAM.N', 'CANCDA.S', 'CAPP.PA', 'CAPCC.L']

df, err = ek.get_data(rics, ['TR.CLOSEPRICE.date', 'TR.PriceCloseDate', 'TR.Volume', 'TR.VWAPVOLUME', 'TR.CLOSEPRICE', 'TR.PriceClose', 'CF_CURR', 'TR.AvgDailyVolume100D', 'TR.Volatility60D','TR.ExchangeCountry','TR.PRICECLOSE.Currency']
           , {"SDate":'2021-12-31'})

df

ric-data.png

And the reason there is no data for 1334.T, and CAM.N is that those stocks are delisted and their new RIC is 1334.T^C14, CAM.N^D16, respectively.

Are you using a similar code to above or trying to achieve something different?


Best regards,

Haykaz


ric-data.png (56.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
38 2 1 2

Seeing that you had no issues retrieving the data for the list of 10 RICs, I took it and hard coded it into my script, rather than using the dynamically sourced list. Sure enough, I also got data.

So I thought possibly it was the batch size I was using, as normally the script snaps 1,000 RICs at a time. I dropped this to 100 and the first couple of runs seemed to be ok, retrieving the required data.

I did the same with a batch size of 500 and again the first couple of runs were ok. However, when I tried to run the full set, I could see the first couple coming back fine again, but after that, more often than not the data was missing.

Possibly it is just a problem with the API being overloaded for year end? Or possibly some sort of additional throttling has been added?

I appreciate that this is a difficult issue to replicate.

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.

I could replicate the problem on my end as well and it seems it is not because of the date (31-12-2021) as I get the same problem (when I get data missing more often than not) for other dates as well. The problem seems to be related to the response time as a result of a relatively large number of RICs requested. I consulted with my colleague @chavalit-jintamalit, and he advised that having large amount of RICs in a single API call can sometimes fail on the source. A possible workaround could be reducing the size of input rics list.

For a more detailed investigation you can also raise a ticket via helpdesk (https://my.refinitiv.com/) by refering the case to TSG (technical support group). Please mention that the code is verified to be correct, issue randomly happen when the ric list is large and need more to be investigated by Technical Support Group.

Putting here the error message as well

microsoftteams-image-2.png

Upvotes
25k 87 11 23

Hi @thomas.goodman

If the Eikon support team have referred you back to the Developer portal, I apologise.

I have contacted the support person and advised them to escalate the ticket to the appropriate team internally and to update you of the progress.

If you do not hear back confirming the above in the next 24hrs please let us know and we can chase.


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.