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

uva60
Newcomer
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!!
0
Best Answer
-
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])0
Answers
-
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.0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛