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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
23 9 14 23

Restrict Composite extraction request for certain exchange

I am using below Composite extraction request where i am providing ISIN with the certain fields.

Currently its giving the response as result for all different exchanges(RIC). For every ISIN i am getting more than 100 rows as returned for all the different exachanges (RIC).

I want to restrict the extraction request for certain exchange for ISIN like:

  • Frankfurt - F
  • Stuttgart - SG
  • München - MU
  • New York - N
  • London - L
  • Tokyo - T
  • Eurex - d


Below is my composite extraction request:

requestBody = {
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.CompositeExtractionRequest",
        "ContentFieldNames": [
            "ISIN","RIC","Average Volume - 30 Days","Average Volume - 90 Days","Close on Close Volatility - 90 Days","Dollar Daily Value Average - 30 Days","CESR Free Float","CRA Free Float","Outstanding Shares - Issue Shares Amount","Outstanding Shares - Other Shares Amount"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [{
                "Identifier": "DE000A168205",
                "IdentifierType": "Isin",
                "Source":"*"
            }],

        "ValidationOptions": {
                "AllowInactiveInstruments": "false"
            },
            "UseUserPreferencesForValidationOptions": "false"
        },
        "Condition": {
            "ScalableCurrency": "true"
        }
    }
}


Is it possible to limit the request for certain exchange for ISIN ?


dss-rest-apidss
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.

Hello @rahul.deshmukh ,

Please confirm if this exact request is giving results for you?

From my test, the result was:

"All identifiers were invalid.  No extraction performed."
@zoya faberov i have updated the request correctly now...which gives me all the exchanges for certain Isin and i want to restrict for certain exchanges
Upvote
Accepted
32.2k 40 11 20

Hello @rahul.deshmukh ,

I do not see "Exchange" filter included in Composite request spec, the filter that is available is "Source", please see Composite request spec in REST API Reference Tree for the details.

Try this:

1. To see Contributor Codes in the result

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.CompositeExtractionRequest",
        "ContentFieldNames": [
            "ISIN","RIC","Average Volume - 30 Days","Average Volume - 90 Days","Close on Close Volatility - 90 Days","Dollar Daily Value Average - 30 Days","CESR Free Float","CRA Free Float","Outstanding Shares - Issue Shares Amount","Outstanding Shares - Other Shares Amount","Contributor Code"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [{
                "Identifier": "DE000A168205",
                "IdentifierType": "Isin",
                "Source":"*"
            }],
 
        "ValidationOptions": {
                "AllowInactiveInstruments": "false"
            },
            "UseUserPreferencesForValidationOptions": "false"
        },
        "Condition": {
            "ScalableCurrency": "true"
        }
    }
}

2. Next, you can include the codes that you require in the filter and filter the results:

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.CompositeExtractionRequest",
        "ContentFieldNames": [
            "ISIN","RIC","Average Volume - 30 Days","Average Volume - 90 Days","Close on Close Volatility - 90 Days","Dollar Daily Value Average - 30 Days","CESR Free Float","CRA Free Float","Outstanding Shares - Issue Shares Amount","Outstanding Shares - Other Shares Amount","Contributor Code"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [{
                "Identifier": "DE000A168205",
                "IdentifierType": "Isin",
                "Source":"FRA"
            },
            {
                "Identifier": "DE000A168205",
                "IdentifierType": "Isin",
                "Source":"STU"
            }],
 
        "ValidationOptions": {
                "AllowInactiveInstruments": "false"
            },
            "UseUserPreferencesForValidationOptions": "false"
        },
        "Condition": {
            "ScalableCurrency": "true"
        }
    }
}

Resulting in:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Isin",
            "Identifier": "DE000A168205",
            "ISIN": "DE000A168205",
            "RIC": "SHVA.F",
            "Average Volume - 30 Days": null,
            "Average Volume - 90 Days": null,
            "Close on Close Volatility - 90 Days": null,
            "Dollar Daily Value Average - 30 Days": null,
            "CESR Free Float": null,
            "CRA Free Float": null,
            "Outstanding Shares - Issue Shares Amount": null,
            "Outstanding Shares - Other Shares Amount": null,
            "Contributor Code": "FRA"
        },
        {
            "IdentifierType": "Isin",
            "Identifier": "DE000A168205",
            "ISIN": "DE000A168205",
            "RIC": "SHVA.SG",
            "Average Volume - 30 Days": null,
            "Average Volume - 90 Days": null,
            "Close on Close Volatility - 90 Days": null,
            "Dollar Daily Value Average - 30 Days": null,
            "CESR Free Float": null,
            "CRA Free Float": null,
            "Outstanding Shares - Issue Shares Amount": null,
            "Outstanding Shares - Other Shares Amount": null,
            "Contributor Code": "STU"
        }
    ],


Hope that this information helps

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.

@zoya faberov thanks this looks good. But currently i have 1000 ISIN list and i am passing 50 ISIN per request. In this case its really difficult to write source for different exchange for each ISIN...Is it possible to write for example "Source" : "STU", "FRA" in request ?
Upvotes
32.2k 40 11 20

Hello @rahul.deshmukh ,

If you have 1000 ISINs to request with, the approach that I would use is include "Contributor Code" in the request and filter out the results, based on "Contributor Code", dropping any result points that do not match the requirement.

The alternative approach may be not to use ISINs as identifiers, but to convert them to RICs with exchange spec, first. You may find useful article ISIN to RIC conversion with the DSS (DataScope Select) REST API.

To my best knowledge, Source field in the request spec does not include comma or regex options.

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.

@zoya faberov what do you mean actually "filter out the results, based on "Contributor Code" " ...do you mean first i should extract for all exchanges and then filter out from result ?

I will also check the article thanks..

@rahul.deshmukh ,

Yes.

If you have 1000 ISINs, not all of which may be present from every source, I would consider filtering source from the results, rather then in the request.

@zoya faberov Thanks One more small question is do we have any field which gives me load date or current sysdate ? I just need this so that i will know i extracted the data from today for example...

Show more comments

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.