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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 3

I cannot get the ICE Brent Futures RIC 0#LCO: using ek.get_timeseries

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonfutures
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
39.3k 76 11 27

The call to get chain constituents can be simplified compared to the example @chavalit.jintamalit provided.

tmp_df, err = ek.get_data('0#LCO:',['DSPLY_NAME'])
Then to use the chain constituents to retrieve timeseries of price history we need to select 'Instruments' column from the dataframe returned by get_data method, convert series to list and drop the first element of the list because the first constituent of this chain is not a future RIC - it's the RIC providing total volume and open interest for all Brent futures.
futures = tmp_df['Instrument'].tolist()[1:]
Finally for a short time span we can retrieve the timeseries for all Brent futures using a single call.
ek.get_timeseries(futures, start_date='2019-07-01', end_date='2019-08-01')
However, since get_timeseries method returns a max of 3K rows which is shared by all instruments in the call, to retrieve a longer time span of price history we need to split the list of RICs into smaller chunks and request price history separately for each chunk. In practice it may be best to retrieve timeseries of price history for each individual RIC.
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
18.1k 21 12 20

0#LCO: is a chain RIC.

You can get all the underlying RIC by following this code:

Then you can get time series on each individual underlying RIC code:


ahs-01.png (81.7 KiB)
ahs-02.png (12.0 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.