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!!
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
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛