eikon data api passing parameter

ric=['7207.T']

fields = ['TR.GICSSector', 'TR.GICSIndustry', 'TR.ClosePrice', 'CF_CURR', 'TR.CompanyMarketCap']

params={'TR.CompanyMarketCap': {'CURN':'USD'}}

ndata = eikon_data.get_data( rics, fields,params);

Could you help me with passing arguments to get_data function? For example, I'd like marketcap in USD and above code does not work.

Best Answer

    • 7207.T is not a valid RIC.
    • To apply CURN parameter only to TR.CompanyMarketCap use
    ek.get_data('7201.T',['TR.GICSSector', 'TR.GICSIndustry', 'TR.ClosePrice',
    'CF_CURR', 'TR.CompanyMarketCap(CURN=USD)'])

    To apply CURN parameter only to all fields which accept this parameter (in this case it will be TR.ClosePrice and TR.CompanyMarketCap) use

    ek.get_data('7201.T',['TR.GICSSector', 'TR.GICSIndustry', 'TR.ClosePrice',
    'CF_CURR', 'TR.CompanyMarketCap'],{'CURN':'USD'})
    • Check out this tutorial, which talks at length about finding metadata (field names and parameters) for use with Eikon Data APIs.

Answers