Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by andy.ej · Aug 01, 2018 at 08:01 AM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonexchanges

How to get all list stock of exchange, like Hong Kong Stock Exchange?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov.1 · Aug 01, 2018 at 12:01 PM

Here's an example.

ek.get_data('SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeMarketIdCode,"XHKG"))',['TR.CommonName'])

The exchange code XHKG used in the above expression is known as Market Identifier Code or MIC. The expression in the first argument of get_data method above uses Equity Screener available in Eikon. The Screener returns a max of 5K rows. If the exchange listing exceeds 5K instruments, then you need to break the request into multiple and introduce additional criteria such as for instance market cap. E.g. first retrieve all stocks listed on the exchange with market cap above X, then all stocks from the same exchange with market cap between X and Y, and then all stocks with market cap below Y.
To construct an Equity Screener expression follow the wizard behind Screener button in Thomson Reuters tab in Eikon Excel ribbon. Once you insert the Screener into Excel worksheet you can copy the screener expression from =TR Excel worksheet function and paste it into your code as the first argument for get_data method.
To learn more about using Equity Screener watch video tutorial titled "Create Data Retrieval Functions using Equity Screener" available from the main Eikon menu under Help - Tutorials and Training.

Comment
andy.ej
Zhenya Kovalyov

People who like this

2 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by jason.ramchandani01 · Aug 01, 2018 at 08:07 AM

Hi @andy.ej

Its super simple - just use a chain RIC - you can preface a stock index RIC eg .HSI with a 0# and it will operate over all constituents in that index. You can also use these chain RICs in other API calls directly eg ek.get_timeseries or ek.get_news_headlines. If you want the Main Board Constituents for HKSE you can use the chain RIC 0#MBD.HK. See the code below:

RICS = ['0#.HSI']
fields = ['CF_NAME']
df,err = ek.get_data(RICS,fields)
df.head()
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
andy.ej · Aug 01, 2018 at 10:38 AM 0
Share

Thanks to reply

But I want to get all stock list in some stock exchange, not member of index

As the example you show, it only gets 50 stocks from Hong Kong stock exchange, may be it have more than 1,000 stocks in Hong Kong stock exchange.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

Download API Proxy Python for Windows.

How do I get the closing prices of the 10-first trading days for all stocks listed at german stock exchange for the last 20 years in eikon?

What other parameters can be used with the statement pertaining to Corporate Actions data such as Stock Splits?

How to get all investors for a list of stocks, historically with the python API

List all the Symbolds listed on the exchange along with their volume and traded quantity ?

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges