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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
7 3 1 4

TickHistory Time & Sales data not available via DSS REST API

I am pulling a TickHistory Time & Sales data for a collection of futures. I can do that via DataScope Select GUI. For example,

Instrument: CGZH6

Fields: Trade - Open, Trade - High, Trade - Low, Trade - Price

Range Query: 2006-01-01 00:00:00 to 2007-01-01 00:00:00 UTC

Data is available and everything seemed ok through GUI. However when I submitted the same request through the REST API. I got a 200 Success status_code, but the content said "All Identifiers were invalid".

When I ran the same request for a different instrument CGZM9 over 2008. I did get some valid data back. So there's nothing wrong with my API code. But data availability seemed very sporadic.

I need to do a complete extract of the TickHistory data without gaps.

dss-rest-apidatascope-selectdss
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.

1 Answer

· Write an Answer
Upvotes
Accepted
13.7k 26 8 12

@nelson.lam,

CGZH6 is a historical instrument that was last traded in 2016, as can be seen by doing a historical search on the RIC:

Therefore, to retrieve data, you need to specify in your request that you want to allow historical instruments. By default they are not allowed, hence the "invalid identifiers" message you receive.

Below is the body of a request in Postman that delivers the data. Note the 2 lines in the IdentifierList that contain ValidationOptions (to allow historical instruments), and UseUserPreferencesForValidationOptions (which overrides the user preferences set in the GUI):

{
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
    "ContentFieldNames": [
      "Trade - Open", "Trade - High", "Trade - Low", "Trade - Price", "Trade - Volume",
      "Trade - Exchange Time"
    ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", 
      "InstrumentIdentifiers": [ { "Identifier": "CGZH6", "IdentifierType": "Ric" } ],
      "ValidationOptions": {"AllowHistoricalInstruments": true},
      "UseUserPreferencesForValidationOptions": false
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ApplyCorrectionsAndCancellations": false,
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2006-01-01T00:00:00.000Z",
      "QueryEndDate": "2007-01-01T00:00:00.000Z",
      "DisplaySourceRIC": true
    }
  }
}

Hope this helps.


cgzh6.png (24.3 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.

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.