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?
For a deeper look into our DataScope Select SOAP API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials
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?
@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" } } }
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?
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!