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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvote
Accepted
17 0 0 3

Hi, on the DSS REST API, how do you search for indices from an Exchange (example: NAS) that belong to a specific criteria (example: GICS industry or TRBC classification). Appreciate if any sample code can be provided.

#technologydss-rest-api#contentindicestrbc
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.

Hi @austin.fan01 ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@austin.fan01

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 20

Hello @austin.fan01 ,

My first and probably best suggestion will be to work with Refinitiv content experts to pinpoint the way to do this search via Datascope GUI. The approach that you come up with we will try to reproduce via DSS REST API.

Additionally, I would like to discuss a potential approach that I have researched:

The indices for NAS exchange can be identified, for example, via HistoricalCriteriaSearch

{
                {protocol}}{
                {host}}{
                {api}}Search/HistoricalCriteriaSearch 
{
  "Request": {
    "RicPattern": null,
    "BondTypeCodes": null,
    "ContributorIds": null,
    "CountryCodes": null,
    "CurrencyCodes": null,
    "ExchangeCodes": ["43"],
    "FutureMonthCodes": null,
    "InstrumentTypeCodes": ["22","118"], 
    "OptionMonthCodes": null,
    "OptionTypeCodes": null,
    "CouponRate": null,
    "StrikePrice": null,
    "ExpiryDate": null,
    "MaturityDate": null,
    "Range": {
      "Start": "2022-11-07T00:00:00.000Z",
      "End": "2022-11-08T00:00:00.000Z"
    }
  }
}

There is no provision to filter on request either on GICs or on TRBC codes.

If your indices are equity indices, you can also do:

{
                {protocol}}{
                {host}}{
                {api}}Search/EquitySearch
{
    "SearchRequest": {
        "AssetStatus": "Active",
        "AssetCategoryCodes": ["EQI"],
        "SubTypeCodes": null,
        "CurrencyCodes": null,
        "CompanyName": null,
        "Description": null,
        "DomicileCodes": null,
        "ExchangeCodes": [ "NAS"],
        "FairValueIndicator": null,
        "FileCodes": null,
        "GicsCodes":   null,
        "OrgId": null,
        "Ticker": null,
        "Identifier": null,
        "IdentifierType": null,
        "PreferredIdentifierType": null
    }
}

However, from my testing, GicsCodes filter will not be effective for indices- because for indices this content is not populated.

In step 2, Via TermsandConditionsRequest I request TRBC and GICS information on the indices RICs obtained from step 1:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/ExtractWithNotes
{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TermsAndConditionsExtractionRequest",
        "ContentFieldNames": [
           "RIC", "CUSIP", "ISIN", "SEDOL", "Issuer OrgID", "Currency Code","TRBC Business Sector Code","GICS Industry Code"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                { "Identifier": ".BANKT", "IdentifierType": "Ric" },
                { "Identifier": ".NQPL60LMEURN", "IdentifierType": "Ric" },
                { "Identifier": ".NQASPA5010JPYN", "IdentifierType": "Ric" },
                { "Identifier": ".NQASPA5010LM", "IdentifierType": "Ric" }
            ]
        }
    }
}

Resulting in:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Ric",
            "Identifier": ".BANKT",
            "RIC": ".BANKT",
            "CUSIP": null,
            "ISIN": null,
            "SEDOL": null,
            "Issuer OrgID": "70344",
            "Currency Code": "USD",
            "TRBC Business Sector Code": "5510",
            "GICS Industry Code": null
        },
        {
            "IdentifierType": "Ric",
            "Identifier": ".NQPL60LMEURN",
            "RIC": ".NQPL60LMEURN",
            "CUSIP": null,
            "ISIN": null,
            "SEDOL": null,
            "Issuer OrgID": "70344",
            "Currency Code": "EUR",
            "TRBC Business Sector Code": "5510",
            "GICS Industry Code": null
        },
        {
            "IdentifierType": "Ric",
            "Identifier": ".NQASPA5010JPYN",
            "RIC": ".NQASPA5010JPYN",
            "CUSIP": null,
            "ISIN": null,
            "SEDOL": null,
            "Issuer OrgID": "70344",
            "Currency Code": "JPY",
            "TRBC Business Sector Code": "5510",
            "GICS Industry Code": null
        },
        {
            "IdentifierType": "Ric",
            "Identifier": ".NQASPA5010LM",
            "RIC": ".NQASPA5010LM",
            "CUSIP": null,
            "ISIN": null,
            "SEDOL": null,
            "Issuer OrgID": "70344",
            "Currency Code": "USD",
            "TRBC Business Sector Code": "5510",
            "GICS Industry Code": null
        }
    ],

I.e. TRBCs appear to be populated, while GICS are not.

Therefore, if one is able to come up with the list of required TRBCs, in step 3, one should be able to further filter the result from step 2, not request, but result, for example, keeping indices where TRBC = 5510

This approach may allow to arrive at the results you are looking for, but by working out the search via GUI and emulating it via API, you can potentially come up with a better solution. Once you have the GUI-driven approach- let us know, and we will try to help to migrate it to DSS REST API.

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.