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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 1 1 1

How to filter ISIN by Instrument Type Code

Hello

I'm trying to get data using TermsAndConditionsExtractionRequest. As it shown in the tutorial, there are several steps of getting data. Such as request token, load json request etc.

I'm interested in the step, where I need to append instruments to the array and post request to DSS REST server.

Here is my JSON request body:

{
"ExtractionRequest": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TermsAndConditionsExtractionRequest",
             "ContentFieldNames": [               
               "RIC",
              "Security Long Description",
              "Usage Instrument Type",
              "Currency Code",
              "Refinitiv Classification Scheme"
             ],

            "IdentifierList": {
                "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
                "InstrumentIdentifiers": []
            }
        }
}

There is no problem to get data, but the problem occurs when obtaining data on a specific type of instruments.

I faced with the problem, when I try to get data for ETF instruments (Exchange Traded Funds).

I'm using ISIN codes as prefferred identifier. For example:

Isin: US78463V1070

If I post request with this ISIN, this instrument type is defined as a MTLF (Mutual Fund) and its Source defined as LIP. So I'm getting the value LP40097677 (it's a lipper code) in the RIC field from my json request. As a result, the most of the field are unavailable for me as we have no acces for Lipper data.

I'm expecting to get the value GLD.P in the field RIC for this ISIN. Moreover, if I make json request using IdentifierType: RIC, I can get all the interested fields.

Here is a screenshot from DataScope GUI.

1647173741535.png

I'm trying to exclude Funds from my json request, but so far without success.

I found in REST API Reference Tree that it is possible to use the parameter InstrumentTypeGroup in json request.

I have a list of instruments and post the following request:

_inst[0] is for identifier type (Isin in this case) and _inst[1] is for identifier itself (US78463V1070).

for _inst in _instList:
    _jReqBody["ExtractionRequest"]["IdentifierList"]["InstrumentIdentifiers"].append(
        {"IdentifierType": _inst[0], "Identifier": _inst[1] })

How can I use the parameter InstrumentTypeGroup in my request? Or please help to find the other way

Thank you in advance

pythondatascope-selectjsonisinetf
1647173741535.png (87.4 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.

1 Answer

· Write an Answer
Upvotes
Accepted
78.1k 246 52 72

@k.malkova

Th InstrumentTypeGroups is a parameter of the /Search/InstrumentSearch endpoint.

1647225213733.png

You can use it with the /Search/InstrumentSearch endpoint.

For the US78463V1070, you can specify a source in the InstrumentIdentifier. For example:

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TermsAndConditionsExtractionRequest",
        "ContentFieldNames": [               
               "RIC",
              "Security Long Description",
              "Usage Instrument Type",
              "Currency Code",
              "Refinitiv Classification Scheme"
             ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [              
                { "Identifier": "US78463V1070", "IdentifierType": "Isin","Source":"PSE" }
              
            ]
        }
    }
}

The output is:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Isin",
            "Identifier": "US78463V1070",
            "RIC": "GLD.P",
            "Security Long Description": "SPDR Gold Shares",
            "Usage Instrument Type": "Equities",
            "Currency Code": "USD",
            "Refinitiv Classification Scheme": "ETFC"
        }
    ],
    "Notes": [

1647225213733.png (35.8 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.