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 0 0 0

API Is it possible to obtain company peers by specific criteria?

Hi all

I am currently using the Python API to obtain peer companies for given instruments. Is there a possibility to obtain peers based on specific criteria. I am currently only able to obtain the Starmine peers but would be interested in industry peers from a given region.

Regards

Phil

python apisectorspeers
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
Upvote
Accepted
14k 30 5 10

Hi @cctpe ,

To filter the industrial/country of the company, fields 'TR.TRBCIndustryGroup','TR.TRBCIndustry','TR.HeadquartersCountry' can be used

Plus, the peer companies can be retrieved with the code below.

Then Python code can be used to filter the peer companies you would like to get

ric = 'IBM.N'
peers, err = ek.get_data([ric,"Peers("+ric+")"],['CF_CLOSE','CF_NAME','TR.TRBCIndustryGroup','TR.TRBCIndustry','TR.HeadquartersCountry'])
peers

1655959735624.png

You may find the available fields and their description using Data Item Browser (DIB)

Here's a video demonstrate how to use Data Item Browser

1655959839788.png

Hope this helps


1655959735624.png (59.3 KiB)
1655959839788.png (109.4 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.