"No data available" error through API but it is in Eikon

Hello,

I am trying to retrieve data for some Saudi stocks, e.g. RIC 4130.SE, with Python using:

candles = ek.get_data(instruments = "4130.SE", fields=["Open","High","Low","Close","Volume"],  start_date = "2010-01-01T00:00:00", end_date = "2023-11-01T00:00:00", interval='daily', corax = 'adjusted')


However, I just get about 12 days of history (see small snapshot below).

1699632553369.png

However, in Eikon I can clearly see:

1699632679435.png

(it goes back to 2010).

Any suggestions on what am I doing wrong?

Thanks!

Best Answer

  • @megren

    Thank you for reaching out to us.

    Please confirm the API that you are using. How did you import ek?

    According to the parameters, it could be the ek.get_timeseries method.

    The code looks like this:

    candles = ek.get_timeseries("4130.SE", 
                         fields=["Open","High","Low","Close","Volume"],  
                         start_date = "2010-01-01T00:00:00", 
                         end_date = "2023-11-01T00:00:00", 
                         interval='daily', 
                         corax = 'adjusted')
    candles

    The output is:

    1699850736148.png


Answers

  • @Jirapongse Thanks, I used "import eikon as ek". It works with a single ticker, but not with a list of RICs, is it maybe subsetting to the latest available datapoint?


    Thank you so much for your help anyways!