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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
21 1 1 1

Get historical data (chain) via eikon api (get_timeseries) problem

Im trying to get historical corn data, eg get the historical values for ric chain 0#C: but got an error:

get_timeseries(["0#C:"],start_date="2010-01-01",end_date="2011-01-01")

eikonError.EikonError: Error code Error | 0#C:: Invalid RIC

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-api
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.

Upvote
Accepted
646 14 22 29

you have to run chain request first. Then get_timeseries for received RICs

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.

Tnx! And how does the chain request looks like?

dataFrame = ek.get_data(['0#C:'], ['RECORDTYPE'])

ok, but when i want to get historical data, eg for 2010-10-01 then i need to get the chain first for 2010-10-01 to be able to collect the values (eg settlement) for the items listed that day in the chain.

Show more comments
Upvotes
24.9k 87 10 22

Hi @3352edee-c7b3-42de-95ff-77348a2fc138

I am not an Eikon API specialist, but I don't believe the get_timeseries method takes a Chain RIC as a valid 1st parameter.

As per the documentation the first parameter can be 'a string or a list of strings' i.e. Single RIC or List of RICs. Therefore, you would need to extract the RICs from the Chains into a string list before calling the method.

There is a post here about getting the Chain Constituents using Eikon API - hope this helps.

IF you are not familiar with Chains, then the intro section of this article may also help.

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.