question

Upvotes
Accepted
1 0 0 0

How can i get all companies listed in any exchange for a period?

I am using both refinitiv web and plug-in in Excel.

I would like to get all listed companies in London Business Exchange between 2005 and 2020 (active, inactive… everything)

Thanks in advance!!

refinitiv-dataplatform-eikon#technologyexcelexchangeswebcompany-research
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 @uva60

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

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
1.4k 5 3 6

Hi @uva60

You can try with the below code to use the search capability and retrieve equites listed on a selected exchange. There is no flag for a listing time window but if you need that you can e.g. check the timeseries to see if any datapoint was available for the defined period.

import refinitiv.data as rd
from refinitiv.data.content import search
import pandas as pd
rd.open_session()

result_df = pd.DataFrame()

custom_search = f"SearchAllCategoryv2 eq 'Equities' and ExchangeCode eq 'LSE'"

#use navigators functionality to sort the number of expected results that each bucket contains less than 10k (search limit)
#we use NameLength parameter that is applicable for all the instruments

response=search.Definition(
        view = search.Views.EQUITY_QUOTES,
        filter = f'{custom_search}',
        top = 0,
        navigators = "NameLength(buckets:10)"  
    ).get_data()

navigators = response.data.raw['Navigators']['NameLength']['Buckets']

#sample output:
#       [{'Label': 'Below 10', 
#       'Filter': 'NameLength lt 10', 
#       'Count': 4606},
#       {'Label': 'Between 10 And 12',
#       'Filter': '(NameLength ge 10 and NameLength lt 12)',
#       'Count': 6315},
#       {'Label': 'Between 12 And 14',
#       'Filter': '(NameLength ge 12 and NameLength lt 14)',
#       'Count': 6904},


#iterate over navigators and merge the filter syntax with previous custom search syntax
for n in navigators:
           sub_response = search.Definition(
                view = search.Views.EQUITY_QUOTES,
                filter = f"{custom_search} and {n['Filter']}",
                select = "IssuerLegalName,ExchangeName,RIC,IssueISIN",
                top=10000).get_data()
        
        #concatenate results
        result_df = pd.concat([result_df, sub_response.data.df])
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
5.8k 21 2 6

Hi @uva60, Please note that this Developer Q&A Forum is for technical API questions. For content questions, please reach out to my.refinitiv.com
With that said, I would advise looking into Search and/or the DIB.

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.