How to get available fields in TickHistoryRaw report template type?

Hi,
We are using TIckHistory REST API v2, and when I try to get the available fields on TickHistoryRaw report template type by calling the following in C#, the 'availableFields' is empty
var availableFields = _extractionContext.GetValidContentFieldTypes(ReportTemplateTypes.TickHistoryRaw);
But I get a list available list (which is not empty) when using EndOfDayPricing report template type in above statement.
Do you know the reason for this?
Thanks.
Best Answer
-
Hi, please refer to attached sample C# code for TRTH v2 RAW extraction.c-code.txt
The Tick History Raw template doesn't have individually accessible fields that can be selected. They are essentially returned from the template in bulk.
Tick History Raw will always have the following fields:
#RIC,Domain,Date-Time,Type,MsgClass/FID number,UpdateType/Action,FID Name,FID Value,FID Enum String,PE Code,Template Number,Key/Msg Sequence Number,Number of FIDs
You can also verify this in the DSS GUI as well by creating a Tick History Raw report and noting that there is no tab for fields.
Thank you,Regards,
Beera0
Answers
-
I have tested it; the below code is running fine.
ExtractionsContext extractionsContext =
new ExtractionsContext(dssUri, dssUserName, dssUserPassword);
string sessionToken = extractionsContext.SessionToken;
Console.WriteLine("Returned session token: " + sessionToken);
var availableFields = extractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.TickHistoryRaw);
foreach (var field in availableFields)
{
Console.WriteLine(field.Name);
}It returns the list of content fields.
Domain
History End
History Start
Instrument ID
Instrument ID Type
Sample DataHowever, with this TickHistoryRaw, you cannot select which fields to include. They are all included in the output.
0 -
Thanks for the reply. I again used exactly the same code as above and I still get zero size 'availableFields' ! I get the token printed though, so it must be some thing else.
As mentioned it works with other report types like EndOfDayPricing.
Do you have any idea what might be wrong?
Thanks.
0 -
What are the versions of ThomsonReuters.Dss.RestApi.Client.dll and ThomsonRetuers.Dss.Core.RestApi.Common.dll used by the application?
I am using 11.1.527.
0 -
I am using the same version as you above.
0 -
Could you please check that your DSS account has a permission to use TRTH? You can login via DSS GUI at https://hosted.datascope.reuters.com/. Then, select Report Templates -> Create. You should see Tick History report templates when using Permissioned Template Filter.
0 -
I logged in to https://hosted.datascope.reuters.com but I cannot find any Report Templates button or menu anywhere!
0 -
From the DATASCOPE SELECT drop down, you should see Report Templates -> Create.
0 -
Thanks, I found it. And I can see TickHistory the 4 templates
0 -
@mojtaba.danai
Are they permissioned?
Please use the following code the trace HTTP request and response and then share the output.
ExtractionsContext extractionsContext =
new ExtractionsContext(dssUri, dssUserName, dssUserPassword);
extractionsContext.ResponseReceived += async (sender, args) => {
Console.WriteLine("\nRequest: {0}\n", args.Request.RequestUri);
Console.WriteLine("\nResponse Status Code: {0}\n", args.Response.StatusCode);
Console.WriteLine(args.Response.Headers.ToString());
if (args.Request.RequestUri.ToString().EndsWith("RequestToken")) return;
var contents = await args.Response.Content.ReadAsStringAsync();
Console.WriteLine("Content:\n {0}", contents);
};
string sessionToken = extractionsContext.SessionToken;
var availableFields = extractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.TickHistoryRaw);
foreach (var field in availableFields)
{
Console.WriteLine(field.Name);
}
Console.WriteLine("Press Enter to exit");
Console.ReadLine();0 -
7:45:32 AM: DownloadReutersMarketData Obtaining request token
Request: https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken
Response Status Code: OK
Pragma: no-cache
X-Client-Session-Id: c60073ae-fbfe-478f-bfdc-5897752e879d
X-Request-Execution-Correlation-Id: e55ba480-b0b5-4a7a-b4c9-aa9932649260
X-App-Id: Custom.RestApi
X-App-Version: 11.1.558.64
Cache-Control: no-cache
Date: Wed, 06 Sep 2017 21:45:28 GMT
Set-Cookie: DSSAPI-COOKIE=R3479498792; path=/
Server: Microsoft-IIS/7.5
Request: https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/GetValidContentFieldTypes(Re portTemplateType=ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ReportTemplateTypes'TickHistoryR aw')
Response Status Code: OK
Pragma: no-cache X-Client-Session-Id: c60073ae-fbfe-478f-bfdc-5897752e879d
X-Request-Execution-Correlation-Id: 1be68ca2-480b-4185-b4ee-982ffcd2f49e
X-App-Id: Custom.RestApi
X-App-Version: 11.1.558.64
Cache-Control: no-cache
Date: Wed, 06 Sep 2017 21:45:30 GMT
Set-Cookie: DSSAPI-COOKIE=R2817038826; path=/
Server: Microsoft-IIS/7.5
Content: {"@odata.context":"https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ContentFieldTypes", "value":[]}
Press Enter to exit
I hope this helps to identify the issue. Looks like the content value is empty!
0 -
This could be a permission issue, if the content field is also empty for other TickHistory templates:
extractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.TickHistoryTimeAndSales);
extractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.TickHistoryMarketDepth);
extractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.TickHistoryIntradaySummaries);You can contact your TR's account team to verify the permission. Otherwise, please provide us with your DSS username. Then I can contact the DSS support team to verify it.
0 -
We can get the available fields for other TickHistory templates you have mentioned above like TickHistoryTimeAndSales, TickHistoryMarketDepth and TickHistoryIntradaySummaries
So I am not sure why we can get the available fields for TickHistoryRaw. Do you still think it is permission issue?
0 -
I see. I will contact TRTH support team to verify this issue.
0 -
I have worked on a example RIC <IBM.N> and extracted Tick History RAW on REST API:
Step 1) POST
{
"ExtractionRequest": {
"@odata.type": raw-extract-for-ibmn.txt"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"ContentFieldNames": [],
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [ { "Identifier": "IBM.N", "IdentifierType": "Ric" } ],
"ValidationOptions": null,
"UseUserPreferencesForValidationOptions": false
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2017-09-02T00:00:00.000Z",
"QueryEndDate": "2017-09-02T23:59:59.999Z",
"DisplaySourceRIC": false
}
}
}Step 2) GET , received :
{
"@odata.context":
"https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
"JobId": "0x05dd01d18e4b2f86",
"Notes": [
"Extraction Services Version 11.1.37239 (5fcaa4f4395d), Built Aug 9 2017 15:35:02\nUser ID: 9008163\nExtraction ID: 2000000002147382\nSchedule: 0x05dd01d18e4b2f86 (ID = 0x0000000000000000)\nInput List (1 items): (ID = 0x05dd01d18e4b2f86) Created: 09/07/2017 11:12:32 Last Modified: 09/07/2017 11:12:32\nReport Template: _OnD_0x05dd01d18e4b2f86 (ID = 0x05dd01d1904b2f86) Created: 09/07/2017 11:12:06 Last Modified: 09/07/2017 11:12:06\nSchedule dispatched via message queue (0x05dd01d18e4b2f86), Data source identifier (FFFFE88D9F974A13851EB8293AF3FE7F)\nSchedule Time: 09/07/2017 11:12:07\nProcessing started at 09/07/2017 11:12:07\nProcessing completed successfully at 09/07/2017 11:12:35\nExtraction finished at 09/07/2017 11:12:35 UTC, with servers: tm04n01\nInstrument <RIC,IBM.N> expanded to 1 RIC: IBM.N.\nQuota Message: INFO: Tick History Cash Quota Count Before Extraction: 12681; Instruments Extracted: 1; Tick History Cash Quota Count After Extraction: 12681, 2536.2% of Limit; Tick History Cash Quota Limit: 500\nManifest: #RIC,Domain,Start,End,Status,Count\nManifest: IBM.N,Market Price,2017-09-02T00:04:02.707833621Z,2017-09-02T21:33:50.894840139Z,Active,5\n"
]
}Step 3) GET , received results: Please refer to attachment "RAW extract for IBM.N
Tick History RAW data is the data directly received from the exchange feeds with no manual intervention / normalization of data. Therefore the data reflects like the sample above (Unlike other templates where you see normalized field names).I would like to inform that if you perform a RAW extraction over the weekend it includes REFRESH message which will provide you with the complete list of fields available on that Exchange or Market. I have attached IBM.N RAW output file , please refer to FIDs under REFRESH message.
You can also refer to Master Field List "FID Master list with descriptions" on <http://paz.thomsonreuters.com/portal/docs/doc_browse_page.cfm?bMode=edit&channelid=11047>, it provides the complete list of FIDs.0 -
Thanks. Please let me know how it goes.
0 -
I have been using C# .Net code (as mentioned in the question text) to retrieve the available fields and the received list is empty for this template.
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
- 687 Datastream
- 1.4K DSS
- 623 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
- 255 ETA
- 557 WebSocket API
- 38 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
- 276 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
- 688 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
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛