How to create RangeQuery of a CorporateAction template

c.ciurlo
c.ciurlo Newcomer

Hi,

how can I create this CorporateActionsStandardReportTemplate (XML file showed below) whit REST API Datascope, in particular the RangeQuery section?

Can you give me an example? Thank you.

Best regards.


<?xml version="1.0"?>

<ReportRequest xmlns="http://www.refinitiv.com/Datascope/ReportRequest.xsd"&gt;

<ReportTemplate xmlns:version="1">

<ReportAction>Replace</ReportAction>

<Name>NEW Historical FULL DATA RTCE Future Corax report</Name>

<CorporateActionsStandardEvents>

<RangeQuery>

<QueryStart>

<AllHistoricalEvents>

<AllowNullDates>No</AllowNullDates>

</AllHistoricalEvents>

</QueryStart>

<QueryEnd>

<AllFutureEvents> </AllFutureEvents>

</QueryEnd>

<AllowEmptyEvents>No</AllowEmptyEvents>

<ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>

</RangeQuery>

...

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @c.ciurlo

    I assume that you would like to create a CorporateActionsStandardReportTemplate with DSS REST API. I have tested with the following request.

    POST: Extractions/CorporateActionsStandardReportTemplates
    {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate",
      "ShowColumnHeaders": false,
      "Name": "corax2",
      "Headers": [],
      "Trailers": [],
      "ContentFields": [
        {
          "FieldName": "Corporate Actions Type"
        },
        {
          "FieldName": "Capital Change Event Type"
        },
        {
          "FieldName": "Capital Change Event Type Description"
        },
        {
          "FieldName": "Actual Adjustment Type"
        }
      ],
      "Condition": {
          "ReportDateRangeType": "Range",
          "ExcludeDeletedEvents": true,
          "IncludeDividendEvents": true
          
          }
    }

    The XML of the corax2 report template has the following RangeQuery property.

    <Name>corax2</Name>
        <CorporateActionsStandardEvents>
          <RangeQuery>
            <QueryStart>
              <AllHistoricalEvents>
                <AllowNullDates>No</AllowNullDates>
              </AllHistoricalEvents>
            </QueryStart>
            <QueryEnd>
              <AllFutureEvents> </AllFutureEvents>
            </QueryEnd>
            <AllowEmptyEvents>No</AllowEmptyEvents>
            <ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>
          </RangeQuery>

Answers

  • c.ciurlo
    c.ciurlo Newcomer

    Hi @jirapongse.phuriphanvichai,

    thank you!

    So it's enough to specify just "ReportDateRangeType": "Range".



    Instead, what parameter is needed to indicate a specific start date?

    For example, to obtain this RangeQuery:


    <?xml version="1.0"?>

    <ReportRequest xmlns="http://www.refinitiv.com/Datascope/ReportRequest.xsd"&gt;

    <ReportTemplate xmlns:version="1">

    <ReportAction>Replace</ReportAction>

    <Name>PROVA_CORPORATE_2021</Name>

    <CorporateActionsStandardEvents>

    <RangeQuery>

    <QueryStart>

    <Date>

    <Month>3</Month>

    <Day>10</Day>

    <Year>2021</Year>

    </Date>

    </QueryStart>

    <QueryEnd>

    <AllFutureEvents> </AllFutureEvents>

    </QueryEnd>

    <AllowEmptyEvents>No</AllowEmptyEvents>

    <ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>

    </RangeQuery>


    Thank you.

    Best regards

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @c.ciurlo

    Sorry for the late response.

    The request looks like this:

    POST: Extractions/CorporateActionsStandardReportTemplates
    {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate",
      "ShowColumnHeaders": false,
      "Name": "corax2",
      "Headers": [],
      "Trailers": [],
      "ContentFields": [
        {
          "FieldName": "Corporate Actions Type"
        },
        {
          "FieldName": "Capital Change Event Type"
        },
        {
          "FieldName": "Capital Change Event Type Description"
        },
        {
          "FieldName": "Actual Adjustment Type"
        }
      ],
      "Condition": {
          "ReportDateRangeType": "Range",
          "QueryStartDate": "2021-03-10",
          "ExcludeDeletedEvents": true,
          "IncludeDividendEvents": true
          
          }
    }

    The XML contains the following:

       <Name>corax2</Name>
        <CorporateActionsStandardEvents>
          <RangeQuery>
            <QueryStart>
              <Date>
                <Month>3</Month>
                <Day>10</Day>
                <Year>2021</Year>
              </Date>
            </QueryStart>
            <QueryEnd>
              <AllFutureEvents> </AllFutureEvents>
            </QueryEnd>
            <AllowEmptyEvents>No</AllowEmptyEvents>
            <ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>
          </RangeQuery>
  • c.ciurlo
    c.ciurlo Newcomer
    Thank you!
    Regards