Is there a possibility to get all the RICs for a particular exchange with ek.get_symbology (Python A

For example I would get 5 RICs with the following request: RSearch("EQUITY","Search:SG2D00968206 ExchangeName:'Singapore Exchange Securities Trading Ltd'","NBROWS:10",..). How can I do the same by ek.get_symbology?

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @solik

    You can use ek.get_symbology to convert ISIN to RICs. Then, from the returned RICs, you can retrieve CF_EXCHNG (the exchange identifier on which the instrument trades). Next, you need to filter RICs by CF_EXCHNG.

    For example:

    ricsList = ek.get_symbology(["SG2D00968206"], from_symbol_type="ISIN",  to_symbol_type="RIC", raw_output=True,  bestMatch=False)

    df = ek.get_data(ricsList['mappedSymbols'][0]['RICs'], ['CF_EXCHNG'])

    print (df[0].loc[df[0]['CF_EXCHNG']=='SES'])

    The output is:

    image