question

Upvotes
Accepted
16 2 2 9

How I create a request to set 12 in your TRTH REST API V2 via Java. how I set Dividend Rate use 12 DecimalPlaces?

decimal-places.txt

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.

1 Answer

Upvotes
Accepted
11.3k 25 8 13

@Manigandan.R

From the provided request message, you are using On Demand extraction.

As far as I know (refer to this question), there is no method to set ouput format (i.e. decimal place, ThousandSeparator) for the On Demand extraction.

However, the method to set output format is available for the Schedule extraction. User can do this once creating Report template. Please see this tutorial for more information about the Schedule extraction.

Also, below is the example of request message creating CorporateActionsStandardReportTemplate to retreive 12 decimal places for "Dividend Rate" field.

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/CorporateActionsStandardReportTemplates

{
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate",
    "ShowColumnHeaders": false,
    "Name": "CorpoateActionsTestTemplate",
    "ContentFields": [
        {
            "FieldName": "Dividend Rate",
            "Format": {
                "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ContentFieldNumberFormat",
                "DecimalPlaces": 12,
                "DecimalSeparator": "Period",
                "UseLeadingZero": false,
                "NegativeSignPosition": "Before",
                "ThousandSeparator": "Comma",
                "UseThousandSeparator": true,
                "UseTrailingZero": false
              }
        },
        {
            "FieldName": "Dividend Record Date",
            "Format": null
        }
    ],
    "Condition": {
        ...
    }
}
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.

@

veerapath.rungruengrayubkul

It is problem for me, because I will request data via Java interface rather than gui. Do you plain to change the API soon add this functon, what is the estimate time? because it cause lot of different between the TRTH v1 and TRTH v2 via Programming interface.

@Manigandan.R

As we discussed in an email, Schedule extraction is available via both GUI and REST API, so Java application can be implemented to use Schedule extraction via REST API. The Tutorial 12: GUI control calls: immediate extract demonstrates how to create Schedule extraction using both GUI and REST API, since it is stored in the DSS server.

For the Java example, please see the DSS2ImmediateScheduleTicksTRTH example in the Java Code Examples downloaded from this link. For this case, client needs to modify the Report template type to use CorporateActionsStandardReportTemplates)

Click below to post an Idea Post Idea