question

Upvotes
Accepted
111 2 5 8

How to get the chain constituents using Eikon Scripting API in python?

How to get the chain constituents using Eikon Scripting API in python?

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

1 Answer

· Write an Answer
Upvotes
Accepted
434 1 2 2

Hi @brianleung

You can get the members with:

ek.get_data('0#.ftse','tr.companyname')

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.

This works for stock index chains, but not for other chains such as futures, options, FX, e.g. "0#ED:", "0#TRI*.U", "FX=" etc.
One can of course write a script getting the value of LONGLINK1 - LONGLINK14 fields and traversing chain links in LONGNEXTLR until the value is empty.
But given that chains are quite popular, it would be nice to have get_chain function added to the library.

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.