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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 1 4 5

Find out if a company is listed on multiple exchanges using the Python API?

Is there a way to determine if a company is listed on multiple exchanges using the Python API? Currently I can find out where a company is based:

ek.get_data(['RIO.AX'], ['CF_NAME', 'TR.CompanyMarketCap', 'TR.HeadquartersCountry'],
                        {'SDate': '0CY'})

However, I haven't been able to find a way to determine if this company is also on another exchange (in this case, Rio Tinto is based in Australia, but also on the London exchange).

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonapiexchanges
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
4.6k 26 7 22

Since there is not really a searching capability within the API, the only way I found to achieve this is a little rusty. The key is to use the raw output of the get_symbology function, and use the ISIN as an input:

tr.get_symbology(['AU000000RIO1'], to_symbol_type='RIC', raw_output=True, bestMatch=False)

You can ignore the RICs with hat suffixes, these are delisted shares, where the first letter is the month code and the year (you can look them up on RULES2 page in the quote app on Eikon).


icon clock
10 |1500

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

Click below to post an Idea Post Idea