question

Upvotes
Accepted
16 2 2 9

Making a request on TRTH REST API for Speed Guide page

I’ve looked at REST API guide and REST API case reference guide but couldn’t find a sample which elaborates on accessing SpeedGuide pages.

For example: If a client wants to request RAW data for Speed Guide page <LIF/AEX> in REST API, what code to use?

tick-history-rest-apirest-apipagespeedguide
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

@Manigandan.R

Here is the HTTP code to make such a raw request (you can run this in Postman):

1) Make an HTTP POST request to this endpoint:

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

Request body (example for the RIC you mention):

{
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "ValidationOptions": {
        "AllowHistoricalInstruments": true
      },
      "UseUserPreferencesForValidationOptions": false,
      "InstrumentIdentifiers": [{
        "Identifier": "LIF/AEX",
        "IdentifierType": "Ric"
      }]
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2017-01-01T00:00:00.000Z",
      "QueryEndDate": "2017-03-31T00:00:00.000Z",
      "ExtractBy": "Ric",
      "SortBy": "SingleByRic",
      "DomainCode": "MarketPrice",
      "DisplaySourceRIC": true
    }
  }
}

2) Retrieve the location URL from the HTTP 202 response header:

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRawResult(ExtractionId='0x05ad075dd1ab3036')

3) Make an HTTP GET request to the location URL you just retrieved.

Repeat till you receive an HTTP 200 status response.

4) Retrieve the JobId from the HTTP 200 response body:

"JobId": "0x05ad075dd1ab3036",

5) Make an HTTP GET request to this endpoint (note the JobId passed as parameter in the URL) :

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/RawExtractionResults('0x05ad075dd1ab3036')/$value

This will return the results.

Important note on the data

For RAW data the contents are returned in REFRESH and UPDATE messages. They can be difficult to parse and understand. The RIC you mention contains two longlink items, so in this particular case the results are not very interesting. Most of the data this RIC displays on screen in Eikon comes from the first longlink, LIFAEX01 ...

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