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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
11 4 2 5

Get content for a specific date (or date range)

Is it possible to invoke the DSS Rest APIs and get content for specific historical dates or date ranges. For example, to get exchange rates for EUR to USD for 01-01-2017 to 01-02-2017. Would this require a change in the identifier list?

dss-rest-apidatascope-selectdsshistoricaldate
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

Upvotes
Accepted
648 4 4 6

@nisheeth.agarwal

you can use below codes for date range extraction

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/Extract


{
    "ExtractionRequest": {
        "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TimeSeriesExtractionRequest",
        "ContentFieldNames": [
            "Close Price",
            "Alternate Close Price",
            "High Price",
            "Low Price",
            "Open Price",
            "Bid Price",
            "Universal Close Price"
        ],
        "IdentifierList": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
               {
                    "Identifier": "EUR=",
                    "IdentifierType": "Ric"
                }
            ],
            "ValidationOptions": null,
            "UseUserPreferencesForValidationOptions": false
        },
        "Condition": {
            "LastPriceOnly": false,
            "StartDate": "2017-01-01T00:00:00.000Z",
            "EndDate": "2017-01-02T00:00:00.000Z"
        }
    }
}
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.

Thanks NItyanand, that seems great.

But when I try to execute the request, I get the following error message:

"Malformed request payload: For the property name \"LastPriceOnly\" in the JSON request the value could not be parsed successfully. Please check the casing or spelling of the property."

Is the field name something else?

@nisheeth.agarwal

I have just tested the above code, copied out of the response, and pasted in Postman, it works fine. If you send us the exact query you sent we can help you debug it.

Hi Christiaan,

My bad. I just realized I was sending my request as an 'EndOfDayPricingExtractionRequest' rather than a 'TimeSeriesExtractionRequest'. It works for me now, thanks!

Show more comments
Click below to post an Idea Post Idea