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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
39 3 2 10

Unable to download data via DSS REST API

I am using the DSS UI and have successfully able to download the data as showndss-2.jpg


However, when I try to get this data via the REST API, I get the errordss-3.jpg

I have generated my token successfully as shown below.


Please can you help?

Regards

Sumit

dss-rest-api#product#contentpython api
dss-2.jpg (104.4 KiB)
dss-3.jpg (121.9 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.

Upvote
Accepted
79.2k 251 52 74

@sumit

The request structure is invalid.

1711363351580.png

The correct one should be:

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.PriceHistoryExtractionRequest",
        "ContentFieldNames": [
            "RIC",
            "Modified Duration",
            "Duration",
            "Trade Date"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {
                    "Identifier": "TYc1=CTD",
                    "IdentifierType": "Ric"
                }
            ],
            "ValidationOptions": {
                "AllowOpenAccessInstruments": true
            }
        },
        "Condition": {
            "QueryStartDate": "2023-05-24T00:00:00.000Z",
            "QueryEndDate": "2024-01-31T00:00:00.000Z"
        }
    }
}

The "Conversion Factor" field is not in the PriceHistoryExtractionRequest report template.


1711363351580.png (20.1 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.

Thanks. that works!!! However, I see all `nulls`.

Also, just to confirm, is Modified duration for a futures Ctd the same as BPV that we get from , say Eikon or LSEG workspace?

 {
            "IdentifierType": "Ric",
            "Identifier": "TYc1=CTD",
            "RIC": "TYc1=CTD",
            "Modified Duration": null,
            "Duration": null,
            "Trade Date": "2024-01-03"
        },
        {
            "IdentifierType": "Ric",
            "Identifier": "TYc1=CTD",
            "RIC": "TYc1=CTD",
            "Modified Duration": null,
            "Duration": null,
            "Trade Date": "2024-01-04"
        },
@sumit

For questions regarding the DSS content, please contact the Datascope Select support team directly via MyRefinitiv.

Upvotes
79.2k 251 52 74

@sumit

Thank you for reaching out to us.

You may need to set the "AllowHistoricalInstruments" to true, as shown below.

1711338475911.png



1711338475911.png (41.9 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.

Thanks. That made it to work. How can I extract a historical end of day time-series data for the above Ric?


Thanks,

Here's my query....

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.PriceHistoryExtractionRequest",
        "ContentFieldNames": [
            "RIC",
            "Modified Duration",
            "Duration",
            "Conversion Factor",
            "Trade Date"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {
                    "Identifier": "TYc1=CTD",
                    "IdentifierType": "Ric"
                }
            ],
            "ValidationOptions": {
                "AllowOpenAccessInstruments": true
            },
            "Condition": {
                "QueryStartDate": "2023-05-24T00:00:00.000Z",
                "QueryEndDate": "2024-01-31T00:00:00.000Z"
            }
        }
    }
}
And the error I get: { "error": { "message": "Malformed request payload: For the property name \"QueryStartDate\" in the JSON request the value could not be parsed successfully. Please check the casing or spelling of the property." } }

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.