Problem requesting Intraday Summary data for Historical Identifiers using .NET
Hi, I've run into a problem requesting historical intraday data for non-current identifiers.
This code works fine for the current RIC WH0:
var extractionRequest = new TickHistoryIntradaySummariesExtractionRequest()
{
IdentifierList = new InstrumentIdentifierList()
{
InstrumentIdentifiers = new[] { new InstrumentIdentifier { Identifier = "WH0", IdentifierType = IdentifierType.Ric } }
},
Condition = new TickHistoryIntradaySummariesCondition()
{
DaysAgo = null,
MessageTimeStampIn = TickHistoryTimeOptions.GmtUtc,
QueryEndDate = DateTime.UtcNow,
QueryStartDate = DateTime.UtcNow - TimeSpan.FromYears(20),
ReportDateRangeType = ReportDateRangeType.Range,
ExtractBy = TickHistoryExtractByMode.Ric,
SortBy = TickHistorySort.SingleByRic,
DisplaySourceRIC = false,
SummaryInterval = TickHistorySummaryInterval.FifteenMinutes,
TimebarPersistence = true
},
ContentFieldNames = new[]
{
"Close Ask", "Close Bid", "Volume", "Last"
}
};
extractionsContext.Options.AutomaticDecompression = true; //Decompress gzip to plain text
var extractionResult = extractionsContext.ExtractRaw(extractionRequest);
When I then try to get data for historical RIC "WH3", the above code runs but returns no data.
I then tried changing to use "HistoricalInstrumentIdentifier" instead of "InstrumentIdentifier" (line 5), but I get this error:
"Cannot use a HistoricalInstrumentIdentifier when the ReportDateRangeType is not set to PerIdentifier.'"
So, as the error suggested, I changed to use ReportDateRangeType.PerIdentifier. However, I then get this error:
"ThomsonReuters.Dss.Api.ForbiddenException: 'Not authorized to perform extraction with ReportDateRangeType set to PerIdentifer.'"
I am able to request this data via the DSS web portal manually so I don't think I am unauthorized.
What do you suggest to get this working please?
Best Answer
-
The issue is that WH3 is a historical instrument, it was quoted between 2001 and 2013.
What is missing to handle that is to set the instrument validation options to allow historical instruments (they are not allowed by default, and the user preferences set in the GUI only apply to scheduled requests, not to on demand requests).
Below is your sample code, slightly modified, it should do the trick. I pulled out the creation of the instrument identifiers array. It is followed by an instruction to set the validation option we need. After that is your extraction request, inside which I changed the creation of the identifier list, to use 3 parameters: the instrument identifiers array, the validation options, and a 3rd parameter which is required if the second one is set (it disables user preferences):
InstrumentIdentifier[] InstrumentIdentifiers = new[] {
new InstrumentIdentifier { Identifier = "WH3", IdentifierType = IdentifierType.Ric }
};
InstrumentValidationOptions ValidationOptions = new InstrumentValidationOptions { AllowHistoricalInstruments = true };
var extractionRequest = new TickHistoryIntradaySummariesExtractionRequest()
{
IdentifierList = InstrumentIdentifierList.Create(InstrumentIdentifiers, ValidationOptions, false),
Condition = new TickHistoryIntradaySummariesCondition()
{
DaysAgo = null,
...
Hope this helps.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 720 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛