Reputation: 61084
Using the Refinitiv (formerly known as Thomson Reuters ) Eikon Data API, does anyone know how to quickly return all associated company RICs for exchanges such as Oslo Stock Exchange?
The RIC for Oslo Stock Exchange seems to be .OSEBX
And eikon.get_data
has a few examples in the docstring:
import eikon as ek
ek.set_app_key('set your app key here')
data, err = ek.get_data(["IBM", "GOOG.O", "MSFT.O"], ["TR.PriceClose", "TR.Volume", "TR.PriceLow"])
data, err = ek.get_data("IBM", ['TR.Employees', {'TR.GrossProfit':{'params':{'Scale': 6, 'Curn': 'EUR'},'sort_dir':'asc'}}])
fields = [ek.TR_Field('tr.revenue'),ek.TR_Field('tr.open',None,'asc',1),ek.TR_Field('TR.GrossProfit',{'Scale': 6, 'Curn': 'EUR'},'asc',0)]
data, err = ek.get_data(["IBM","MSFT.O"],fields)
So I've tried different variations with eikon.get_data(instruments = ".OSEBX", fields = "RIC")
, but with no success.
Any suggestions?
Upvotes: 1
Views: 3324
Reputation: 174
0#.OSEBX
is an index that represents all shares traded on the market, so what you are really doing is requesting index constituents.
A better way is to execute an Equity Screener query. For example, this will return all stocks listed on OSE and Oslo Axess:
screener_exp ='SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeMarketIdCode, XOAS, XOSL))'
df, e = ek.get_data(screener_exp, 'TR.CompanyName')
You can build screener queries with Eikon Excel.
Upvotes: 2
Reputation: 2600
You can use the chain
(which always starts with 0#
), like this:
data, err = ek.get_data('0#.OSEBX', 'TR.CommonName')
This will give you the RICs of all the companies in the index, plus their respective company names.
Upvotes: 1