New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
1 0 0 0

Unable to resolve identifier when requesting data through refinitiv data api

import refinitiv.data as rd

index_ric = '0#.KS200'

summary = rd.get_history(

universe = index_ric,

fields = [

"TR.CompanyMarketCap",

# "TR.GICSSector",

],

start = "2024-06-01",

end = "2024-06-30"


)

summary
When running the above

I get the following error


RDError: Error code -1 | Unable to resolve all requested identifiers in ['0#.KS200'].




Note i've also tried .KS200

This seems to work for other indices

refinitiv-dataplatform-eikonworkspace-data-api#technology#contentpython apilseg-data-library
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
15.6k 33 5 10

Hi @prit.savani ,

With the Data Library for Python, chain function can be used to retrieve constituents under each chain. Example code of this function can be found at EX-1.01.07-Chains.ipynb

import refinitiv.data as rd
from refinitiv.data.discovery import Chain

rd.open_session()

index_ric = Chain(name="0#.KS200")

#print(index_ric.constituents)

summary = rd.get_data(
    universe = index_ric,
    fields = [
        "TR.CompanyMarketCap.date",
        "TR.CompanyMarketCap"
    ],
    parameters={
        'SDate': '2024-06-01',
        'EDate': '2024-06-30'
    }
)
summary

1730706081679.png

or the data can be retrieved with get_history function as below

summary = rd.get_history(
    universe = index_ric,
    fields = [
        "TR.CompanyMarketCap.date",
        "TR.CompanyMarketCap"
    ],
    start = "2024-06-01",
    end = "2024-06-30"
)
summary

1730706112775.png



1730706081679.png (129.7 KiB)
1730706112775.png (103.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.