company_name = ['entry2']
company_ticker, err =
ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"company_name"))'], ['TR.CommonName'])
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
company_name = ['entry2']
company_ticker, err =
ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"company_name"))'], ['TR.CommonName'])
I hope that this is what you are looking for.
company_name = "Voda" screener_exp = 'SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"{}"))'.format(company_name) company_ticker, err = ek.get_data(instruments=[screener_exp], fields = ['TR.RIC','TR.CommonName','TR.TickerSymbol']) company_ticker
There are other ways to insert values into strings.
I think you may consider search() from RDP Library.
Please review this article.
You can try the RDP Library by launching CODEBOOK app.
Just type "CODEBOOK" on Eikon Search bar and launch the app.
Then browse to \Examples\02-Refinitiv Data Platform Library/1-5.0 - Function Search sample notebook.
@maxwilliams.boko you should use the RDP search service instead (which you can access via your eikon appkey):
import refinitiv.dataplatform as rdp session = rdp.open_desktop_session('YOUR APPKEY HERE')
company_name = 'vodafone' df = rdp.search( view = rdp.SearchViews.Quotes, query = company_name ) print(df['RIC'][0])
I hope this can help.
@maxwilliams.boko you need to pip install refinitiv.dataplatform from python prompt. You can also check our quickstart guide. I hope this can help
It is still not working. I think there should be a way to pass company_name = ['entry2'] in the code to get the company's name.
company_name = ['entry2']
company_ticker, err =
ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"company_name"))'], ['TR.CommonName'])
@jason.ramchandani Thanks for your help. However, I am sure I can use the first code I provided. However, I don’t know how to pass the user entry into the code. I saw somewhere that’s it is possible to use %s something like that