question

Upvotes
Accepted
2 1 1 1

Settings source/exchange/composite python

Hi all,

I am trying to get intraday data via TRTH for a number of instruments (GILTs). I am only interested in composite data, not single sources. I am using ISINs as my IdentifierType.

Thus, first, I would like to know which source code is the right one for refinitiv composite data.

Secondly, it seems that even when I set a source in:

self.instrumentsid = [{"Identifier": i, "IdentifierType": self.identifier_type, "Source": self.source} for i in self.instruments]

with

"IdentifierList": {
  "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
  "InstrumentIdentifiers": self.instrumentsid,
  "UseUserPreferencesForValidationOptions":"false"
}

The request is nonetheless expanding anyway, which is really concerning tbh.

Instrument <ISN,GB00BDRHNP05> expanded to 29 RIC instances: CH35928402=S to GBTSY28=SMKR. Instrument <ISN,GB00BZB26Y51> expanded to 34 RIC instances: CH34468946=S to GBTSY31=SMKR.

So how to avoid expanding RIC instances? Is an ISIN, an IdentifierType and a source not enough to get only one RIC?


Many thx

tick-history-rest-apiricsisin
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.

Upvotes
Accepted
23k 22 9 14

Hello @kevin.ferret,

REST API Reference Tree is the complete reference of available Datascope requests, login with your RTH user id and password,

You can look up the spec of on-demand request by selecting

Extractions -> On Demand Extraction -> ExtractRaw

And select the request to look up from the drop-down list of available requests on the right. This should show request spec, result spec and specific examples.

Datascope backend is shared by the two products, Refinitiv Tick History ( RTH) and Datascope Select (DSS). As your user is permissioned for RTH, and not DSS, RTH requests will be available to you. Both Intraday and EOD requests are part of RTH.

---

I would like to clarify that RICs are not expanded. Chain RICs and ISINs are expanded. If you would like the identifier to be requested as is, you would supply RICs directly, for example:

{
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
    "ContentFieldNames": [
      "Close Ask",
      "Close Bid",
      "High",
      "High Ask",
      "High Bid",
      "Last",
      "Low",
      "Low Ask",
      "Low Bid",
      "No. Asks",
      "No. Bids",
      "No. Trades",
      "Open",
      "Open Ask",
      "Open Bid",
      "Volume"
    ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
      "InstrumentIdentifiers": [{
        "Identifier": "CARR.PA",
        "IdentifierType": "Ric"
      }],
      "ValidationOptions": null,
      "UseUserPreferencesForValidationOptions": false
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2016-09-29T00:00:00.000Z",
      "QueryEndDate": "2016-09-30T00:00:00.000Z",
      "SummaryInterval": "OneHour",
      "TimebarPersistence": true,
      "DisplaySourceRIC": true
    }
  }
}




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.

Upvotes
2 1 1 1

Hi thx for replying.

below the body:

{'ExtractionRequest': {'@odata.type': '#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest', 
 'ContentFieldNames': ['Close Ask',   'Close Bid',   'High',   'High Ask',   'High Bid',   'Last',   'Low',   'Low Ask',   'Low Bid',   'No. Asks',   'No. Bids',   'No. Trades',   'Open',   'Open Ask',   'Open Bid',   'Volume'],  
'IdentifierList': {'@odata.type': '#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList', 
  'InstrumentIdentifiers': [{'Identifier': 'GB00BDRHNP05',     'IdentifierType': 'Isin',     'Source': 'L'}],   
'UseUserPreferencesForValidationOptions': 'false'},  
'Condition': {'MessageTimeStampIn': 'GmtUtc',   'ReportDateRangeType': 'Range',   'QueryStartDate': '2018-01-08T00:00:00Z',   'QueryEndDate': '2018-01-10T00:00:00Z',   'SummaryInterval': 'OneMinute',   'TimebarPersistence': 'true',   'DisplaySourceRIC': 'true'}}}


Many thx

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.

Upvotes
23k 22 9 14

Hi @kevin.ferret,

By submitting TickHistoryIntradaySummariesExtraction requests, if your Identifier type is either ISIN on ChainRIC, it will get expanded into multiple RICs.

  • To avoid the expansion, you may wish to submit one or more specific RICs as identifier to TickHistoryIntradaySummariesExtraction.
  • There may be a request that is more suitable to your requirements (I am a developer, so may be lacking some nuances in content understanding) - I would try EOD:
{
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest",
    "ContentFieldNames": [
      "Instrument ID",
      "Open",
      "High",
      "Low",
      "Last",
      "Volume",
      "VWAP",
      "Number of Price Moves",
      "Trade Date"
    ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [
        {"Identifier": "GB00BDRHNP05",     "IdentifierType": "Isin"}
      ]
    },
    "Condition": {
     "StartDate": "2018-01-08T00:00:00Z",   "EndDate": "2018-01-10T00:00:00Z"
    }
  }
}

That does not expand, results in:

Instrument ID,Open,High,Low,Last,Volume,VWAP,Number of Price Moves,Trade Date
GB00BDRHNP05,99.72,99.97,99.6,,,,,2018/01/08
GB00BDRHNP05,99.91,99.91,99.34,,,,,2018/01/09
GB00BDRHNP05,99.53,99.53,99.17,,,,,2018/01/10
  • Also, to obtain a definitive answer on the correct content request, per your requirements, from one of Refinitiv content experts, as a customer, you can contact Refinitiv Helpdesk Online -> Content -> RTH directly.



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.

Thx,

In your code I see that even if you use {"Identifier": "GB00BDRHNP05", "IdentifierType": "Isin"} it is not expanding right? So what else did you change compared to my previous message (body) to have this result?

Many thx

Hi @kevin.ferret,

This is a different request type, ElektronTimeseriesExtractionRequest, with the different interface spec, please see the above request.

BTW, in the question you said you were requesting composite, so I have tested CompositeExtractionRequest, and did not see what you were seeing. It was because you were running TickHistoryIntradaySummariesExtractionRequest request.

Thx for that. So where are the list of endpoints? I just tried CompositeExtractionRequest and got an error (I am probably making a mistake somewhere). So to be sure, you were able to request intraday market data for the ISIN above using the composite request?

Many thx

Show more comments
Upvotes
262 8 9 15

Hi @Kevin.ferret,

We have GovCorp Search helps to arrive at CPL source specific RIC from ISIN. Below is the example:

End Point:
<https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/GovCorpSearch >

Body:

{

"SearchRequest": {

"AssetStatuses": [

"TEN",

"RES",

"REP",

"FDD",

"RBM",

"RMK",

"RPN",

"PUT",

"PRE",

"NAC",

"LIQ",

"ISS",

"DEF",

"FNG",

"MAT",

"EXC",

"RDM",

"DFS",

"CAN",

"CLD"

],

"Coupon": null,

"CurrencyCodes": null,

"GovCorpContributorCode" : "CPL",

"Group": {

"Agency": true,

"Government": true,

"Corporate": true,

"Supra": true},

"MoodyRatingsCodes": null,

"StandardPoorsRatingsCodes": null,

"Callable": false,

"Convertable": false,

"Extendable": false,

"Putable": false,

"Sinkable": false,

"IssueDate": null,

"MaturityDate": null,

"NextPayDate": null,

"Ticker": null,

"IdentifierType": "Isin",

"Identifier": "GB00BDRHNP05",

"PreferredIdentifierType": "Ric"

}

}

Response:

{

"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Collection(ThomsonReuters.Dss.Api.Content.ValidatedInstrument)",

"value": [

{

"Identifier": "GBT1Q27=",

"IdentifierType": "Ric",

"Source": "CPL",

"Key": "VjF8MHgwMDEwMmM4YmU1OGEwY2Q0fDB4MDAxMDJjODk2OGE4MGM3OXxDUEx8R0NCRHx8fEd8RXxHQlQxUTI3PXw",

"Description": "GBGV 1.250 07/22/27",

"InstrumentType": "GovCorpBond",

"Status": "Valid"

}

]

}

Once you have this composite RIC in your results, you may do a API call to get Tick Data

{

"ExtractionRequest": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",

"ContentFieldNames": ["Close Ask", "Close Bid", "High", "High Ask", "High Bid", "Last", "Low", "Low Ask", "Low Bid", "No. Asks", "No. Bids", "No. Trades", "Open", "Open Ask", "Open Bid", "Volume"

],

"IdentifierList": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",

"InstrumentIdentifiers": [

{ "Identifier": "GBT1Q27=", "IdentifierType": "Ric" }

],

"ValidationOptions": null,

"UseUserPreferencesForValidationOptions": false

},

"Condition": {

"MessageTimeStampIn": "GmtUtc",

"ReportDateRangeType": "Range",

"QueryStartDate": "2021-02-22T00:00:00.000",

"QueryEndDate": "2021-02-23T00:00:00.000",

"SummaryInterval": "OneMinute",

"TimebarPersistence": true,

"DisplaySourceRIC": true

}

}

}



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