Trying to get .GDAXI history, but Eikon only returning the last data point?

>>> start = datetime.datetime(1850, 1, 1) 
>>> end = datetime.datetime.now()
>>> ek.get_timeseries(".GDAXI", interval="monthly", start_date=start, end_date=end)
.GDAXI HIGH CLOSE LOW OPEN COUNT
Date 2019-03-31 11823.29 11526.04 11299.8 11584.24 -1.0
>>>

Best Answer

  • @handrew11
    The behavior you experienced is unexpected. Since it is specific to your Eikon account, as I cannot reproduce it on my end, the only way we can investigate it is by opening a ticket with Refinitiv Helpdesk and working together in direct contact with you. I would happily open a ticket on your behalf, however you chose to register on this portal with a personal rather than a business email address, which effectively makes you anonymous on these forums.
    For this reason you need to reach out to Refinitiv Helpdesk yourself and open a support case. Refinitiv Helpdesk can be reached by either calling the Helpdesk phone number in your country or by using Contact Us capability in your Eikon application.

Answers

  • Hi @handrew11: The reason its failing is that you are trying to pass a datetime to a function that is expecting a string - see correct code below:

    start = str(datetime.datetime(1850, 1, 1).date())
    end = str(datetime.datetime.now().date())
    print(start, " ", end)
    df2 = ek.get_timeseries(".GDAXI", interval="monthly", start_date=start, end_date=end)
    df2
  • One should be able to use datetime for start_date and end_date arguments of get_timeseries method. I have no problem executing the code snippet @handrew11 provided, and I retrieve full timeseries going back to 1987.
    @handrew11, I suggest you use Fiddler to capture the HTTP request going on the wire. Alternatively you may enable logging in eikon library as follows

    ek.set_log_path(r'C:\Temp')
    ek.set_log_level(10)
    The log file name will be pyeikon.%Y%m%d.%H-%M-%S.log
    After you started Fiddler or enabled logging in eikon library reproduce the issue and see the request captured in Fiddler or in the log file.
    The request going on the wire should be
    {'Entity': {'E': 'TimeSeries', 'W': {'rics': ['.GDAXI'], 'fields': ['*'], 'interval': 'monthly', 'startdate': '1850-01-01T00:00:00', 'enddate': '2019-04-03T11:04:51.059467'}}} 
    Is this what you get? Or is the request generated on your end different?
  • @Alex Putkov.

    The log said:

    2019-04-03 09:19:42,118 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['.GDAXI'], 'fields': ['*'], 'interval': 'monthly', 'startdate': '1850-01-01T00:00:00', 'enddate': '2019-04-03T00:00:00'}}}

    I re-ran the code that both you and Jason gave and I am still only getting one month of data. This doesn't happen for other codes, like '.SPX'.

    Does it have to do with my permissions?

  • The request looks correct and I don't think the problem is due to your entitlements. Could you also post the response to the request as it appears in the log file you created?

  • 2019-04-03 09:19:42,266 -- pyeikon -- DEBUG -- HTTP Response code: 200 
    2019-04-03 09:19:42,266 -- pyeikon -- DEBUG -- HTTP Response: {"timeseriesData":[{"dataPoints":[["2019-03-31T00:00:00Z",11823.29,11526.04,11299.8,11584.24,-1]],"fields":[{"name":"TIMESTAMP","type":"DateTime"},{"name":"HIGH","type":"Double"},{"name":"CLOSE","type":"Double"},{"name":"LOW","type":"Double"},{"name":"OPEN","type":"Double"},{"name":"COUNT","type":"Long"}],"ric":".GDAXI","statusCode":"Normal"}]}
  • any idea @Alex Putkov.? I also tried with a different app key and still had the same problem. I'm on a Mac using Python 3.7 with the latest version of Eikon too. I think also .FTSEMIB has the same problem

  • This is very puzzling. Everything looks normal except the response from the Web service. I don't understand what could possibly be the reason you and I get different results. Could you try this request:

    ek.get_timeseries(".GDAXI", interval="monthly", start_date='2016-01-01', end_date='2019-04-03')
    I just changed the value of the start_date to be more recent. Does it make any difference? Do you still only retrieve one row of data timestamped 2019-03-31? What if you change the interval to "weekly" or "daily"? Are you able to display monthly price chart for .GDAXI in Eikon application?
  • A later start date doesn't change anything. Neither does doing 'weekly'. 'Daily' seems to work as expected. The monthly price chart still works in the Eikon application.

  • Hi @Alex Putkov. thank you for response. I would love if you could open a ticket for me. My email address on this forum is also the one associated with my Eikon account, so you can go ahead and use that one. Thanks!

  • @handrew11
    Sure, no problem. I was able to locate you in Eikon user database and opened support ticket on your behalf. Refinitiv Helpdesk will reach out to you to investigate the issue. Just in case you need a reference to communicate with the Helpdesk, your support case number is 07504050.