For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
45 3 13 7

How do I get a list of the current consituents of an index using the DSS REST API

I should retrieve on a monthly basis the list of the securities that constitute some of the populat indexes, over the DSS REST API, with a .Net application. Any idea how to do that ?

I can't find any mention of index anywhere, and the chains search (which could be one answer) in the DSS GUI does not find such a thing as the .DJI or ^DJI, although the latter is supposed to be the RIC code of the Dow Jones index, and the chains search want to have a RIC code...

Any help very welcome !

Regards

Bernard

dss-rest-apidatascope-selectdssindex
icon clock
10 |1500

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

1 Answer

Upvote
Accepted
11.3k 25 8 13

@BTh

Hi Bernard,

Normally, there could be Chain RIC which provides list of constituent RICs. You can use the Chain RIC to retrieve list of constituent RICs with TermsAndConditions extraction. Below is the example code. As far as I know, the Chain RIC for .DJI is 0#.DJI.

For Chain RICs of other index, please contact Content support via MyRefinitiv.

    var extractionsContext = new ExtractionsContext(new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/"), dssUserName, dssUserPassword);
    TermsAndConditionsExtractionRequest extractionRequest = new TermsAndConditionsExtractionRequest
    {
        IdentifierList = InstrumentIdentifierList.Create(
            new[] { new InstrumentIdentifier { Identifier = "0#.DJI", IdentifierType = IdentifierType.ChainRIC } }, null, false),
        ContentFieldNames = { "RIC" },
        Condition = new TermsAndConditionsCondition
        {
            IssuerAssetClassType = IssuerAssetClassType.AllSupportedAssets,
            ExcludeWarrants = false,
            //StartDate = new DateTimeOffset(DateTime.Now)
        }
    };

    var extractionResult = extractionsContext.ExtractWithNotes(extractionRequest);
    var extractedRows = extractionResult.Contents;

    //Output
    if (!extractedRows.Any())
        Console.WriteLine("No rows returned");
    else
    {
        foreach (var row in extractedRows)
            Console.WriteLine(
                row.Identifier + " (" + row.IdentifierType + ") " +
                String.Join(", ", row.DynamicProperties.Select(dp => dp.Key + "=" + dp.Value)));
    }
icon clock
10 |1500

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

Click below to post an Idea Post Idea