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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
27 2 0 4

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 >>>
eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvotes
Accepted
39.2k 75 11 27

@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.

icon clock
10 |1500

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

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.

Upvotes
6.7k 8 6 7

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
icon clock
10 |1500

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

Upvotes
39.2k 75 11 27

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?
icon clock
10 |1500

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

Upvotes
27 2 0 4

@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?

icon clock
10 |1500

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

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

Show more comments
Click below to post an Idea Post Idea