Can't get constituent RIC of Korean Index via Python API

I can't get the constituent ric of Korean Index such as KOSPI(.KS11), KOSPI200(.KS200) via Python API.

However, when requesting indices from other countries, I was able to obtain the data properly. (Photo1)

refinitiv-20230315-1.jpg



So, I searched for the Korean Index in the Quote screen, and the data was successfully retrieved without any issues. (Photo2)

refinitiv-20230315-3.jpg


How can I get the contituent RIC of Korean Index via Python API ?

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @sjh0724 ,

    The error "Access Denied: User req to PE(3084)" indicates that the user who requests the item does not have permission for PE 3084 which is required to access data of this item.

    Please contact your account representative (account manager or customer success manager) who can help you to grant permission to access the data.

    Hope this helps and please let me know in case there's any other questions.

Answers

  • @sjh0724 So thanks for your question and sorry to hear about your issue. I believe this has to do with the fact that you are not subscribed to that exchange for realtime. On the quote screen you show for the KOSPI200 you can see that all of the quotes are delayed - the RICs have a '/' in front of them and also after the company name we have '/d' which both indicate a delayed feed. I have tested this and you can do this with our Refinitiv Data Library - first:

    pip install refinitiv-data

    then:

    import refinitiv.data as rd
    from refinitiv.data.discovery import Chain
    rd.open_session()
    rd.get_data(Chain('0#.KS200'),['TR.CommonName'])

    1678887083116.png


    It didn't work for me either using the Eikon Data API. FYI the RD library already contains a full version of the Eikon Data API - so you can use both APIs from the same library. ie:

    import refinitiv.data.eikon as ek
    ek.set_app_key('YOUR APP KEY HERE')

    I hope this can help.

  • Thank you so much Jason :) ! However, when I tried to follow the steps you provided, I encountered the following error message. How can I resolve this issue?

    target.jpg


  • Thank you so much Raksina. :)

    As you have informed, this error was due to an authorization issue.

    I spoke with the account manager and received guidance on additional services to obtain the necessary authorization.