Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 3

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

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apifutures
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.

Hello @hassan.darian,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

@hassan.darian

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
39.4k 77 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.2k 21 13 21

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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