Market Cap from ISIN. Used to work, does not work anymore.

Some weeks ago I downloaded the market capitalization from a list of ISINs using the following code. Now, the same code does not work anymore. Why?

1643305521920.png

Best Answer

  • @popescua So i think the issue here is that the implied ISIN to RIC symbology conversion could not return a 'best match' singular resolution. In cases such as these you can use the get_symbology API call and set the best_match parameter to false and then select the first RIC suggested.

    ric = ek.get_symbology('AU0000069130',from_symbol_type='ISIN',to_symbol_type='RIC',best_match=False)

    params = {'SDate':'20220101','EDate':'20200101','Frq':'D'}
    df,err = ek.get_data(ric['RICs'][0][0],['TR.CompanyMarketCapitalization.date','TR.CompanyMarketCapitalization'],params)
    df

    1643308581307.png

    I hope this can help.