question

Upvotes
Accepted
16 4 4 14

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 512.0 KiB each and 1.0 MiB total.

Escalated to DSS_SWAT

The case number for this question is 05514648.

@Manigandan.R

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
11.3k 25 9 14

@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 512.0 KiB each and 1.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)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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