Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRTH /
avatar image
Question by mojtaba.danai · Sep 05, 2017 at 11:42 PM · rest apitickhistoryv2

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.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

9 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Beera.Rajesh · Sep 12, 2017 at 07:58 AM

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,
Beera


c-code.txt (1.9 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by jirapongse.phuriphanvichai · Sep 06, 2017 at 12:13 AM

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 Data

However, with this TickHistoryRaw, you cannot select which fields to include. They are all included in the output.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by mojtaba.danai · Sep 06, 2017 at 12:29 AM

@

jirapongse.phuriphanvichai

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.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Sep 06, 2017 at 12:36 AM 0
Share

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.

version.png (32.1 KiB)
avatar image
Answer by mojtaba.danai · Sep 06, 2017 at 01:14 AM

@jirapongse.phuriphanvichai

I am using the same version as you above.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Sep 06, 2017 at 02:02 AM 0
Share

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.

dss.png (27.8 KiB)
avatar image
Answer by mojtaba.danai · Sep 06, 2017 at 02:38 AM

@jirapongse.phuriphanvichai

I logged in to https://hosted.datascope.reuters.com but I cannot find any Report Templates button or menu anywhere!

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Sep 06, 2017 at 02:43 AM 0
Share

From the DATASCOPE SELECT drop down, you should see Report Templates -> Create.

menu.png (30.2 KiB)
avatar image
Answer by mojtaba.danai · Sep 06, 2017 at 03:00 AM

@irapongse.phuriphanvichai

Thanks, I found it. And I can see TickHistory the 4 templates

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by jirapongse.phuriphanvichai · Sep 06, 2017 at 06:18 AM
@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();
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by mojtaba.danai · Sep 06, 2017 at 05:52 PM

@irapongse.phuriphanvichai

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!

Comment

People who like this

0 Show 4 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Sep 07, 2017 at 12:10 AM 0
Share

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.

avatar image
mojtaba.danai jirapongse.phuriphanvichai ♦♦ · Sep 07, 2017 at 01:08 AM 0
Share

@irapongse.phuriphanvichai

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?

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ mojtaba.danai · Sep 07, 2017 at 02:13 AM 0
Share

I see. I will contact TRTH support team to verify this issue.

avatar image
REFINITIV
Answer by Beera.Rajesh · Sep 07, 2017 at 07:27 AM

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.


raw-extract-for-ibmn.txt (25.3 KiB)
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
mojtaba.danai · Sep 07, 2017 at 08:30 PM 0
Share

@Beera.Rajesh

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.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

Which template type to use for retrieving Equity Spot Index for a date range or a day?

problem with downloading RIC

Corporate Action data retrieval (Stored & sheduled approach)

Error 400 malformed request payload: for sample code on REST API

Trying to get fields list of the ElektronTimeSeries using GET Action on TRTHV2 REST API

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges