question

Upvotes
Accepted
3 1 0 2

Holiday List from TRTH

Is it possible to pull holiday list from TRTH API using ric's MY/Holiday, US/Holiday , SG/HOLIDAY, IN/HOLIDAY etc

tick-history-rest-api
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
11.3k 25 8 13

Hi @Kumar.warthak,

The Holiday list RICs are Speed Guide Pages where each row of data are provided in specific range of fields: ROW80_1 - ROW80_25. To access specific fields, you need to use TickHistoryRawExtraction report template which provides raw field-value format data. Also, the extraction date range could be at least seven days to ensure that Refresh message were received.

Please refer to the Speed Guide Pages section of the REST API User Guide document for more information. Also, I have created an article for this topic.

Below is the example of REST API request message.

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRaw { "ExtractionRequest": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest", "IdentifierList": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": "US/HOLIDAY", "IdentifierType": "Ric" } ], "ValidationOptions": { "AllowHistoricalInstruments": true }, "UseUserPreferencesForValidationOptions": false }, "Condition": { "MessageTimeStampIn": "GmtUtc", "ReportDateRangeType": "Range", "QueryStartDate": "2019-02-05T00:00:00.000Z", "QueryEndDate": "2019-02-12T00:00:00.000Z", "ExtractBy": "Ric", "SortBy": "SingleByRic", "DomainCode": "MarketPrice", "DisplaySourceRIC": true } } }

Result will be in CSV format.


us-holiday.png (84.8 KiB)
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
3 1 0 2

Hi @veerapath.rungruengrayubkul

Thank you for the code, i am able to pull holiday's for all markets. I have a follow up question Is there a simple way to pull data for multiple RIC's, currently iam running as below:

"InstrumentIdentifiers": [ { "Identifier": "US/HOLIDAY", "IdentifierType": "Ric" } { "Identifier":"MY/HOLIDAY", "IdentifierType": "Ric" } { "Identifier": "SA/HOLIDAY", "IdentifierType": "Ric" } ],

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.

@Kumar.warthak

Yes. You can add multiple instruments in the same request. Results of RIC will be generated in the same file, so application needs to parse the file to get result for each RIC. Below is the sample.

"InstrumentIdentifiers": [ 
{ "Identifier": "US/HOLIDAY", "IdentifierType": "Ric" },
{ "Identifier": "MY/HOLIDAY", "IdentifierType": "Ric" },
{ "Identifier": "SA/HOLIDAY", "IdentifierType": "Ric" } ],
Click below to post an Idea Post Idea