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
43 4 5 11

Use Autosuggest capabilities to resolve a list of companies with rd library

Hi guys,

Hope you are doing well.


With Codebook, I'm trying by using RD library to build a python script which will resolve a list of companies.

Broadly speaking, the script will parse a list of company name and will return the corresponding RIC or ISIN or Parent ID


Example:

with the list below:

+-----------------------------------------------------------+

| Company name |

+-----------------------------------------------------------+

| Arla Insurance Company (Guernsey) Limited |

+-----------------------------------------------------------+

| Swiss Re Europe S.A. |

+-----------------------------------------------------------+

| Stena Insurance AG |

+-----------------------------------------------------------+



I want to retrieve

+-----------------------------------------------------------+----------------------------+

| Company name | Company permID |

+-----------------------------------------------------------+----------------------------+

| Arla Insurance Company (Guernsey) Limited | 5036231548 |

+-----------------------------------------------------------+----------------------------+

| Swiss Re Europe S.A. | 4295934474 |

+-----------------------------------------------------------+----------------------------+

| Stena Insurance AG | 5000134472 |

+-----------------------------------------------------------+----------------------------+





Can you advice how I can do that?


python#technologypython apicodebook
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
15.3k 32 5 10

Hi @yaokoffi.kouassi ,

You may use Advanced Search as a helper to form the query, the step-by-step guide can be found in article Find content and functionality using Refinitiv Data Library with Eikon Advanced Search

Here's an example search, I've edited the first two companies' name a bit to let the result returned

1716447681341.png

from this, the code from export query option it as below, you can adjust the columns to be shown in select parameter and edit top parameter to return more than 10 rows of result

import refinitiv.data as rd
rd.open_session()

rd.discovery.search(
view = rd.discovery.Views.ORGANISATIONS,
top = 10,
filter = "( SearchAllCategoryv2 eq 'Companies/Issuers' and (DTSubjectName in ('Stena Insurance AG' 'Arla Insurance Company' 'Swiss Re Europe SA')))",
select = "CommonName,Gics,RCSOriginalAccountsCurrencyLeaf,PrimaryRIC,Orgid,BondsCount,CdsCount,EquitiesCount,FundsCount,FuturesCount,LoanCount,MortgagesCount,OptionsCount,WarrantsCount,OAPermID,OwnershipExists,OrganisationStatus,MktCapCompanyUsd,RCSFilingCountryLeaf,RCSTRBC2012Leaf,UltimateParentOrganisationOrgid,UltimateParentCompanyOAPermID,RatingX1XRatingRank,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,DTSubjectName,UltimateParentOrganisationName,DTSimpleType,RCSOrganisationSubTypeLeaf,RCSCountryHeadquartersLeaf"
)

1716447854389.png


1716447681341.png (101.6 KiB)
1716447854389.png (94.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.