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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 1 2 3

What is the best way select the entire history of an instrument in DSS rest API

I am interested in getting the entire history of an instrument.

What is the best way to do that outside of using startDate and EndDate?

Is there a condition clause available to select entire history?

Also is there an easy to view all the relevant search conditions?

requestBody={
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TimeSeriesExtractionRequest",
    "ContentFieldNames": [
      "File Code",
      "RIC",
      "Trade Date",
      "Close Price",
      "High Price",
      "Low Price",
      "Open Price",
      "Volume",
      "Bid Price",      
    ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
      "InstrumentIdentifiers": [{
        "Identifier": "CZ8",
        "IdentifierType": "Ric"
      }]
    },
    "Condition": {
      "LastPriceOnly": False,
      "StartDate": "2017-05-24T00:00:00.000Z",
      "EndDate": "2017-05-31T00:00:00.000Z"
    }
  }
}
dss-rest-apidatascope-selectdsshistoricaltime-series
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
13.7k 26 8 12

@Patrick.Trierweiler,

What is the best way to do that outside of using startDate and EndDate?

There is no other way. But it is easy to hard code a start date of 1 Jan 1996 (the database does not contain data before that date), and programmatically set the end date to today.

Is there a condition clause available to select entire history?

No, there is no such condition.

Also is there an easy to view all the relevant search conditions?

I'm not sure I understand this query. The above request is not a search but a data extraction request. Its conditions (like those of all API requests) are listed in the API Reference tree. Search requests are different, and several are available (instrumentSearch, EquitySearch, etc.). You can find their list, description and search criteria in this section of the API Reference tree.

If this does not answer your query, then please add details so we can deliver a better answer.

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.

Click below to post an Idea Post Idea