Retrieving TickHistoryRaw data for economic series via DSS REST API

I'm trying to retrieve TickHistoryRaw data for economic series like USNFAR=ECI via DSS REST API in Python. I followed the tutorial example and posted a TickHistoryRawExtractionRequest successfully. I got a status_code 200 immediately but there's no data in the response body.
Here's the Condition arguments that I sent:
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2006-01-01T00:00:00.000Z",
"QueryEndDate": "2010-01-01T00:00:00.000Z",
"ExtractBy": "Ric",
"SortBy": "SingleByRic",
"DomainCode": "MarketPrice",
"DisplaySourceRIC": True
I expect this request to return all FIDs. I checked on DSS GUI and confirmed there was data for the series since May 2005.
Best Answer
-
I just tested your query, this is what it returns:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
"JobId": "0x06983b877610786a",
"Notes": [
"All identifiers were invalid. No extraction performed."
],
"IdentifierValidationErrors": [
{
"Identifier": {
"@odata.type": "#ThomsonReuters.Dss.Api.Content.InstrumentIdentifier",
"Identifier": "USNFAR=ECI",
"IdentifierType": "Ric",
"Source": ""
},
"Message": "Not found"
}
]
}The extraction notes are key to understand issues; this is why I always recommend logging them. Experimenting in Postman is one of my favorite tools, as it automatically displays error messages and such, which helps a great deal.
In this particular case, the issue is that the instrument was Not found. This is because it is currently no longer quoted. For the instrument validation to succeed on an old instrument, you need to specify that it is a historical instrument, by allowing historical instruments in the ValidationOptions, and overriding the user preferences, using the following 2 lines after the InstrumentIdentifiers object:
{
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [ { "Identifier": "USNFAR=ECI", "IdentifierType": "Ric" } ],
"ValidationOptions": {"AllowHistoricalInstruments": true},
"UseUserPreferencesForValidationOptions": false
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2006-01-01T00:00:00.000Z",
"QueryEndDate": "2010-01-01T00:00:00.000Z",
"ExtractBy": "Ric",
"SortBy": "SingleByRic",
"DomainCode": "MarketPrice",
"DisplaySourceRIC": true
}
}
}This request will deliver an HTTP status 202, and a location URL in the response headers.
After polling the location URL you will get a JobId and extraction notes that clearly state when the instrument was active (2006-2009):
Manifest: #RIC,Domain,Start,End,Status,Count\nManifest: USNFAR=ECI,Market Price,2006-01-03T14:01:24.175993000Z,2009-12-27T00:54:07.885198000Z,Active,16993
Using the JobId you can retrieve the data (222896 lines).
0
Answers
-
How can i pull up the extraction notes? I checked the response returned and I couldn't find that msg/info
0 -
The extraction notes should be in the response to your extraction request, in the object "Notes" which is in the JSON formatted response body, as illustrated in the first box in my initial answer to your query.
If you cannot see them, then please post your request body and endpoint, so that I can check it.
0 -
Using the ValidationOptions I was able to retrieve TickHistoryRaw data. Thanks for the solution. However when I checked the response for Notes (in Python) I can't find it as an Object at the top level like status_code, headers and content. When I ran json() to convert the body into json object I got the following error message,
File "C:\tools\miniconda3\envs\development_2\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)0 -
There seems to be an issue inside the code, specifically with the decoding of the response body, which is where the notes are.
To avoid missing errors during the prototyping phase I often use Postman to ensure I see all the relevant info (headers, body, status, errors, etc.).
Even if it is not for the same data, you might want to have a look at the Python code TRTH_OnDemand_IntradayBars described here, it uses the same workflow as your request, and extracts the notes in step 3.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 638 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 88 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛