How to Label field for the Content Fields of Market Depth and Time/Sales report template of TRTHv2 v

I have tried the following:
JSONOrderedObject reportTemplateJSONObject = new JSONOrderedObject()
.put("@odata.type", "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.TickHistoryTimeAndSalesReportTemplate")
.put("ShowColumnHeaders",true)
.put("Name", trthTickReportTemplateName )
.put("Headers", new JSONArray() )
.put("Trailers", new JSONArray() )
.put("ContentFields", new JSONArray()
.put( new JSONObject()
.put("FieldName", "Quote - Ask Price")
.put( "Format", JSONObject.NULL)
.put("Label", "Quote - Ask Price"))
.put( new JSONObject()
.put("FieldName", "Quote - Ask Size")
.put( "Format", JSONObject.NULL)
.put("Label", "Quote - Ask Size"))
.put( new JSONObject()
.put("FieldName", "Quote - Bid Price")
.put( "Format", JSONObject.NULL)
.put("Label", "Quote - Bid Price"))
.put( new JSONObject()
.put("FieldName", "Quote - Bid Size")
.put( "Format", JSONObject.NULL)
.put("Label", "Foo - Bid Size"))
)
.put("Condition", new JSONOrderedObject()
.put("ApplyCorrectionsAndCancellations", false)
.put("MessageTimeStampIn", "LocalExchangeTime") //All rics in this template are for london so extract in london time
.put("QueryStartDate", sdfz.format(c1.getTime()))
.put("QueryEndDate", sdfz.format(c2.getTime()))
.put("ReportDateRangeType", "Range")
.put("SortBy", "SingleByTimestamp")
);


I have done something similar for MarketDepth template as well. I understand the Depth is trickier as you can have multiple levels, but my hope is that if I specify something like the below then I would get “L1-My AskPrice”, “L2-My Ask Price” etc.


.put("ContentFields", new JSONArray()
.put( new JSONObject()
.put("FieldName", "Ask Price")
.put( "Format", JSONObject.NULL)
.put("Label", "My Ask Price"))

Client is trying to Label content fields
to constrain the column headers returned so that she knew what column the
respective data is in.


For example:

-when she specify
FieldName “Quote – Ask Price” for Time and Sales report template the resulting
column is “Ask Price”

-when she specify
FieldName “Ask Price” for Market Depth report template, the resulting column is
“L1-AskPrice"



She is saying "the columns in the csv are also not in the same order
as she put in her JSON object. Basically, when we create interface
adapters we try to avoid hard coding values, plus who’s to say your API
returned column header names does not change in the future, so basically I need
a way of labelling the columns so I know for each FieldName exactly what column
index it will be or failing that what header name it will be.please advise why
the above two code snippets are having no effect on the column headers
returned?"

Best Answer

  • GICarey
    Answer ✓

    As @Troy-Dalldorf says, it's not currently possible to customize field labels, nor ordering, of Tick History content.

    It's certainly something which we could consider for a future release, so I'd be delighted to hear of specific use-cases which make this feature valuable, to allow for appropriate prioritization.

Answers

  • It is not possible to customize the field labels for Tick History. We should be returning a validation error (400) when a custom label is attempted.

    I will investigate the field ordering issue.

  • Hi Troy, when can we expect next update on this so that I will set the expectations to client accordingly.

  • I have sent a request to product management and waiting for a response. I CC'd you on the email.