Hi,
In the context of a Corporate Actions data retrieval proccess, is there a way of getting (only) the closest (lastest) value of the Shares Amount field for a given symbol (at a given date too)?
Any feedback will be appreciated.
Regards,
Ricardo
@ricardo.siguero,
I analyzed the differences between your 2 lists:
29 common instruments:
11 are in the last results but not in the range results:
This is normal, because their shares amount date is out of the range (2016-05-24 to 2017-05-24) specified in the query:
1 is in the range results and not in the last results: ABE.MC:
I'm not a data specialist, I am unable to explain this discrepancy. Please open a content related enquiry via My Account or call the Thomson Reuters Help Desk directly.
Additional explanation to clarify:
As you observed, these are different criteria sets, that deliver different results.
PS: sorry for the belated response, I was on vacation.
Here is an example to receive the last value:
Body:
{ "ExtractionRequest": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.CorporateActionsStandardExtractionRequest", "ContentFieldNames": [ "Corporate Actions Type", "Shares Amount", "Shares Amount Type", "Shares Amount Type Description", "Shares Amount Date" ], "IdentifierList": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": "ALVG.DE", "IdentifierType": "Ric" }, { "Identifier": "IBM.N", "IdentifierType": "Ric"} ] }, "Condition": { "ReportDateRangeType": "Last", "ExcludeDeletedEvents": true, "IncludeCapitalChangeEvents": false, "IncludeDividendEvents": false, "IncludeEarningsEvents": false, "IncludeMergersAndAcquisitionsEvents": false, "IncludeNominalValueEvents": false, "IncludePublicEquityOfferingsEvents": false, "IncludeSharesOutstandingEvents": true, "IncludeVotingRightsEvents": false, "CorporateActionsCapitalChangeType": "CapitalChangeExDate", "CorporateActionsDividendsType": "DividendPayDate", "CorporateActionsEarningsType": "PeriodEndDate", "ShareAmountTypes": [ "Issued", "Listed" ] } }}
Result:
{ "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Collection(ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionRow)", "value": [ { "IdentifierType": "Ric", "Identifier": "ALVG.DE", "Corporate Actions Type": "SHO", "Shares Amount": 446101300, "Shares Amount Type": "ISS", "Shares Amount Type Description": "Issued", "Shares Amount Date": "2017-09-19" }, { "IdentifierType": "Ric", "Identifier": "IBM.N", "Corporate Actions Type": "SHO", "Shares Amount": 931940297, "Shares Amount Type": "OUT", "Shares Amount Type Description": "Outstanding", "Shares Amount Date": "2017-06-30" } ]}
The data matches what is in the GUI, see the screenshot:
For a specific date (or date range) you could replace this line:
"ReportDateRangeType": "Last",
With the following:
"ReportDateRangeType": "Range", "QueryStartDate": "2017-09-19T00:00:00.000Z", "QueryEndDate": "2017-09-19T00:00:00.000Z",
For the preceding example it would only return the record for ALVG.DE. The IBM.N record would not be included because the shares amount date (June 30 2017) is outside of the range specified in the query. If you do not know the Shares Amount date then you will need to make a query with a large range, and then look at the dates in the results to keep the result(s) you require.
Thank you, @Christiaan Meihsl for your previous response...
We are using the Stored & scheduled approach in our TRTHv2 data accesses, so the endpoint and report template used, for this case, are shown below:
/Extractions/CorporateActionsStandardReportTemplates
{ "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate", "ShowColumnHeaders": true, "Name": "catemplate01", "Headers": [ ], "Trailers": [ ], "ContentFields": [ { "FieldName": "RIC", "Format": null }, { "FieldName": "Shares Amount", "Format": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ContentFieldNumberFormat", "DecimalSeparator": "Period", "UseThousandSeparator": false, "UseTrailingZero": false } }, { "FieldName": "Shares Amount Type", "Format": null }, { "FieldName": "Shares Amount Type Description", "Format": null }, { "FieldName": "Shares Amount Date", "Format": null }, { "FieldName": "Corporate Actions Type", "Format": null } ], "Condition": { "ReportDateRangeType": "Last", "ExcludeDeletedEvents": true, "IncludeCapitalChangeEvents": false, "IncludeDividendEvents": false, "IncludeEarningsEvents": false, "IncludeMergersAndAcquisitionsEvents": false, "IncludeNominalValueEvents": false, "IncludePublicEquityOfferingsEvents": false, "IncludeSharesOutstandingEvents": true, "IncludeVotingRightsEvents": false, "CorporateActionsCapitalChangeType": "CapitalChangeExDate", "CorporateActionsDividendsType": "DividendPayDate", "CorporateActionsEarningsType": "PeriodEndDate" }}
The instrument is populated with more than two-hundred items, including the following:
{ "IdentifierType": "Ric", "Identifier": "POP.MC" }, { "IdentifierType": "Ric", "Identifier": "SABE.MC" }, { "IdentifierType": "Ric", "Identifier": "SAN.MC" },
An excerpt of the CSV file got from the response is shown below:
...SABE.MC,,,,,DIVSABE.MC,5616151196,LIS,Listed,17/11/2016,SHOSABE.MC,,,,,MNASABE.MC,5318076577,,,,MNASABE.MC,,,,,EARSABE.MC,,,,,CAPSAN.MC,4078297870,,,,MNASAN.MC,,,,,MNASAN.MC,,,,,MNASAN.MC,,,,,DIVSAN.MC,,,,,VOTSAN.MC,,,,,PEOSAN.MC,,,,,NOMSAN.MC,,,,,CAPSAN.MC,TRN,LIS,Listed,31/07/2017,SHOSAN.MC,,,,,EAR...
where the SAN.MC symbol shows, for the Shares Amount Type = 'LIS' (the only Shares Amount Type we are focusing on), that the Shares Amount value is set to 'TRN'.
How can we get the related numeric value for such amount in that case?
Thank you very much for your attention and help,
@ricardo.siguero
The "TRN" likely indicate “Truncated” meaning that the data has be truncated due to restriction of the field width available in the report template for the respective field.
The default integer places is only 10, but the share amount of SAN.MC likely is more than that.
You may increase the integer places to '50' (maximum) for the share amount field.
{"FieldName": "Shares Amount","Format": {... "DecimalSeparator": "Period", "UseThousandSeparator": false, "UseTrailingZero": false, "IntegerPlaces": 50}
We've been working in the development of the data access mentioned above, and I'd like to share our experience about it:
I. Approaches
We've tried two different approaches:
(1) Based on the 'Last' qualifier
{ "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate", "ShowColumnHeaders": true, "Name": "E88846_REQUESTCORPORATEACTIONS_207872_TEMPL_93592", "Headers": [], "Trailers": [], "ContentFields": [{ "Format": null, "FieldName": "RIC" }, { "Format": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ContentFieldNumberFormat", "DecimalSeparator": "Period", "IntegerPlaces": "30", "UseThousandSeparator": false }, "FieldName": "Shares Amount" }, { "Format": null, "FieldName": "Shares Amount Type" }, { "Format": null, "FieldName": "Shares Amount Type Description" }, { "Format": null, "FieldName": "Shares Amount Date" }, { "Format": null, "FieldName": "Corporate Actions Type" }], "Condition": { "ReportDateRangeType": "Last", "ExcludeDeletedEvents": true, "IncludeCapitalChangeEvents": true, "IncludeDividendEvents": true, "IncludeEarningsEvents": true, "IncludeMergersAndAcquisitionsEvents": true, "IncludeNominalValueEvents": true, "IncludePublicEquityOfferingsEvents": true, "IncludeSharesOutstandingEvents": true, "IncludeVotingRightsEvents": true, "CorporateActionsCapitalChangeType": "CapitalChangeExDate", "CorporateActionsDividendsType": "DividendPayDate", "CorporateActionsEarningsType": "PeriodEndDate" }}
(2) Based on a given date range
Under it, the range's end-date is set to yesterday's
{ "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate", "ShowColumnHeaders": true, "Name": "E39182_REQUESTCORPORATEACTIONS_207872_TEMPL_45516", "Headers": [], "Trailers": [], "ContentFields": [{ "Format": null, "FieldName": "RIC" }, { "Format": { "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ContentFieldNumberFormat", "DecimalSeparator": "Period", "IntegerPlaces": "30", "UseThousandSeparator": false }, "FieldName": "Shares Amount" }, { "Format": null, "FieldName": "Shares Amount Type" }, { "Format": null, "FieldName": "Shares Amount Type Description" }, { "Format": null, "FieldName": "Shares Amount Date" }, { "Format": null, "FieldName": "Corporate Actions Type" }], "Condition": { "ReportDateRangeType": "Range", "QueryStartDate": "2016-05-24", "QueryEndDate": "2017-05-24", "ExcludeDeletedEvents": true, "IncludeCapitalChangeEvents": true, "IncludeDividendEvents": true, "IncludeEarningsEvents": true, "IncludeMergersAndAcquisitionsEvents": true, "IncludeNominalValueEvents": true, "IncludePublicEquityOfferingsEvents": true, "IncludeSharesOutstandingEvents": true, "IncludeVotingRightsEvents": true, "CorporateActionsCapitalChangeType": "CapitalChangeExDate", "CorporateActionsDividendsType": "DividendPayDate", "CorporateActionsEarningsType": "PeriodEndDate" }}
II. Results
The lists of instruments we got from the data accesses below differs considerably (attached the two lists, where only instruments with entries as 'Listed' have been included)
Number of instruments (Date Range): 30
Number of instruments (Last): 40
It's important to say that the instrument list for the 'Date Range' approach is not a subset of the 'Last' list from the the other one (some instruments appears in one that do not in another, and vice-versa)
So, our question is: shouln't those queries be equivalent? shouldn't I get the same list of instruments and same values?
Thanks, in advance, for your attention and help.
Ricardorange.txt last.txt
Due to an outage of the Thomson Reuters DeveloperCommunity email notification system from 2:30 PM CDT on November 29th until9:00 AM CDT on November 30th we are posting to all questions updated duringthis timeframe in order to ensure all customers receive all relevant emailupdates. Please review this question, and its associated answers, in order toensure you are aware of any possible updates that may have occurred during thisoutage. We apologize for the delay and any inconvenience this has caused.
Matthew Logterman, J.D.
Sr. Product Manager, Thomson Reuters Developer Community