RIC check in my list for Workspace Codebook

Hello Friend,

I'm using Workspace Codebook LSGE data API. I have a list of RICs but I always get some errors like "the universe is not found", which, after I throughly check, is due to one or more invalid RIC in my list eg. BRL3Y=.

Would you kindly advise is there any quick way to get out to me which RIC is invalid in my RIC list?

THanks in advance?

Best Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @dan2025

    Thank you for reaching out to us.

    You can send RICs to the backend endpoints to validate RICs.

    For example, the following code uses the symbol_conversion endpoint to valid RICs.

    import lseg.data as ld
    from lseg.data.content import symbol_conversion
    from lseg.data.discovery import (
        convert_symbols,
        SymbolTypes,
        AssetClass,
        AssetState,
        CountryCode
    )
    ld.open_session()
    response = symbol_conversion.Definition(
      symbols=["LSEG.L","IBM.N","TEST","BRL3Y=","INVALD.XX"],
      from_symbol_type=symbol_conversion.SymbolTypes.RIC,
      to_symbol_types=[
        symbol_conversion.SymbolTypes.RIC]).get_data()
    response.data.df["RIC"].tolist()
    
    image.png
  • dan2025
    dan2025 LSEG
    Answer ✓

    Thank you for the answer. It is very effective !