question

Upvotes
Accepted
1 0 4 1

How do I pull Tick History Intraday Summaries report for ISIN using TRTH REST API?

I have been pulling RICs using the Tick history Intraday Summaries report and wanted to see if I can do the same using ISIN or CUSIP?

The GUI for these reports on dssscope allows only RICs, see attached screenshot below

ISIN is US912828ZX16 , it's a 2 year .125% coupon US Treasury note

tick-history-rest-api
trth.jpg (138.5 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.

Upvotes
Accepted
17.6k 48 13 19

The sample I provided was the JSON message. If you are using Python dictionary, use this:

body = {
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
"ContentFieldNames": [
  "Open Bid",
  "Open Ask",
  "High Bid",
  "High Ask",
  "Low Bid",
  "Low Ask",
  "Close Bid",
  "Close Ask",
  "Volume"
],
"IdentifierList": {
  "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
  "InstrumentIdentifiers": [{
    "Identifier": "US912828ZX16",
    "IdentifierType": "Isin"
  }],
  "ValidationOptions": None,
  "UseUserPreferencesForValidationOptions": False
},
"Condition": {
  "MessageTimeStampIn": "LocalExchangeTime",        #GmtUtc
  "ReportDateRangeType": "Relative",                #Range
  "RelativeStartDaysAgo": 1,
  "RelativeStartTime": "09:00:00.000",
  "RelativeEndDaysAgo": 1,
  "RelativeEndTime": "17:15:00.000",
  "TimeRangeMode": "Inclusive",
  # "ExtractBy": "Ric",
  # "SortBy": "SingleByRic",
  "DateRangeTimeZone": "Eastern Time (US & Canada)", #"UTC-05:00",  #"Local Exchange Time Zone",
  "SummaryInterval": "OneMinute",
  "TimebarPersistence": True,
  "DisplaySourceRIC": False
}
}
}

and be sure to convert it into JSON before sending it to server like:

data = json.dumps(body)
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.

Upvotes
17.6k 48 13 19

Hi @vnigam, You can use Identifier type = Isin when making your request. E.g:

{
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
    "ContentFieldNames": [
      "Close Ask",
      "Close Bid",
      "High Ask",
      "High Bid",
      "Low Ask",
      "Low Bid"
    ],

    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [{
          "Identifier": "US912828ZX16",
          "IdentifierType": "Isin"
        }
      ],

      "ValidationOptions": null,
      "UseUserPreferencesForValidationOptions": false
    },

    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2020-07-08T09:00:00",
      "QueryEndDate": "2020-07-08T17:00:00",
      "SummaryInterval": "TenMinutes",
      "TimebarPersistence": true,
      "DisplaySourceRIC": false
    }
  }
}
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.

Upvotes
1 0 4 1

Hi Gurpreet,

Couple questions:

  1. My query is a schedule relative query, I updated it as below. But still getting this error: Can you confirm if my parameters are correct?

HTTP status of the response: 400

An error occured. Try to run this cell again. If it fails, re-run the previous cell.

2. I executed the query you sent above and I'm getting same error. Also the true, false and null are not in quotes in your query. my python interpreter is showing those as errors

requestBody={
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
    "ContentFieldNames": [
      "Open Bid",
      "Open Ask",
      "High Bid",
      "High Ask",
      "Low Bid",
      "Low Ask",
      "Close Bid",
      "Close Ask",
      "Volume"
    ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [{
        "Identifier": "US912828ZX16",
        "IdentifierType": "Isin"
      }],
      "ValidationOptions": "null",
      "UseUserPreferencesForValidationOptions":"false"
    },
    "Condition": {
      "MessageTimeStampIn": "LocalExchangeTime",        #GmtUtc
      "ReportDateRangeType": "Relative",                #Range
      "RelativeStartDaysAgo": 1,
      "RelativeStartTime": "09:00:00.000",
      "RelativeEndDaysAgo": 1,
      "RelativeEndTime": "17:15:00.000",
      "TimeRangeMode": "Inclusive",
      # "ExtractBy": "Ric",
      # "SortBy": "SingleByRic",
      "DateRangeTimeZone": "Eastern Time (US & Canada)", #"UTC-05:00",  #"Local Exchange Time Zone",
      "SummaryInterval": "OneMinute",
      "TimebarPersistence": "true",
      "DisplaySourceRIC": "false"
    }
  }
}
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.