How do I use the lesg.data API to get the data source corresponding to rics?

rice
rice Newcomer

For example, for a data source with RIC "MX0MGO0000O5=MKTX", it is "MKTX"

Tagged:

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @rice

    Thank you for reaching out to us.

    I can retrieve it from the search API in the LSEG Data Library for Python.

    df = ld.discovery.search(
        view = ld.discovery.Views.SEARCH_ALL,
        query = "MX0MGO0000O5=MKTX",
        select = "DocumentTitle,RIC,ContributorCode"
    )
        
    df
    
    image.png

    The search example is on GitHub.

    For more information, please refer to the Building Search into your Application Workflow article.

  • rice
    rice Newcomer

    Thank you for your help! Using the suggested method I can get some ric's data source, but if RIC='CA135087P576', contributorCode is null, is it correct?Shouldn't it also have a data source?

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    edited May 16

    @rice

    I think CA135087P576 is an ISIN code which can be mapped to a lot of RICs.

    Please try this one.

    df = ld.discovery.search(
        view = ld.discovery.Views.SEARCH_ALL,
        query = "CA135087P576",
        select = "IssueISIN,RIC,Source,DTSource,PriceSourceCode,PriceSourceCode,ContributorCode",
        top=1000
    )
        
    df
    
  • rice
    rice Newcomer
    截屏2025-05-16 14.43.47.png

    I thought this was also a RIC and not an ISIN

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    If I select it, it will show CA135087P57=.

    image.png

    You need to contact the helpdesk team directly via MyAccount to confirm this.

  • rice
    rice Newcomer

    I can't find it, how can i find it in data item browser?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    For content related questions, please contact the helpdesk team directly via MyAccount.