Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • DSS /

For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

avatar image
REFINITIV
Question by constantin.vulpescu · Apr 19, 2016 at 04:11 PM · dss-rest-apidssdatascope-selectrest-api

Sample C# code that excludes deleted items when pulling data from DSS Corporate Actions table

We have 3 queries:

1) We are using CorporateActionsStandardExtractionRequest whereas I see that you are using CorporateActionsStandardReportTemplate – do you anticipate differences in behavior when using one class versus the other?

2) If you look at our setting of the condition, you will see that we set our IncludeInstrumentsWithNoEvents to false whereas you set it to null, and we set our ReportDateRangeType to a string (“Last”) whereas you set it to whatever the value behind ReportDateRangeType.Delta is. Could this be causing issues? Do we need to set any other flags?

newCorporateActionsStandardCondition{ExcludeDeletedEvents =
true,ReportDateRangeType =
ReportDateRangeType,IncludeInstrumentsWithNoEvents
= false,};

3) Can you confirm that the code below works (i.e. that if you try to run it against a sedol with the excludedeleted flag set to true, then no retired shares will be returned)

Your original solution/response was:

Here is the code for excluding deleted events in corp actions:

publicvoid CreateCorporateActionsStandardReportTemplate()
{
Status.Notify(ExtractionsContext, "ReportTemplateType", "GetContentFieldTypes", MethodType.Operation, Publish.Secondary);

//Retrieve the list of available fields. You can skip this step if you already know the list of fields to extract.
//The list of fields contains the code, name, format. Either the code or name can be used as the fieldName when
//adding content fields
var availableFields = ExtractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.CorporateActions);
Status.EndNotify(ExtractionsContext);
Status.Notify(ExtractionsContext, "CorporateActionsStandardReportTemplate", "Create",
MethodType.Operation, Publish.Primary);

//Create the new report template
var reportTemplate = new CorporateActionsStandardReportTemplate
{
Name = Guid.NewGuid().ToString(),
OutputFormat = ReportOutputFormat.CommaSeparatedValues,
Condition = newCorporateActionsStandardCondition
{
PreviousDays = 30,
ReportDateRangeType = ReportDateRangeType.Delta,
CorporateActionsCapitalChangeType = CorporateActionsCapitalChangeType.CapitalChangeExDate,
CorporateActionsDividendsType = CorporateActionsDividendsType.DividendPayDate,
CorporateActionsEarningsType = CorporateActionsEarningsType.PeriodEndDate,
CorporateActionsEquityOfferingsType = CorporateActionsEquityOfferingsType.AllPendingDeals,
CorporateActionsMergersAcquisitionsType = CorporateActionsMergersAcquisitionsType.DealAnnouncementDate,
CorporateActionsNominalValueType = CorporateActionsNominalValueType.NominalValueDate,
CorporateActionsSharesType = CorporateActionsSharesType.SharesAmountDate,
CorporateActionsStandardEventsType = CorporateActionsStandardEventsType.None,
CorporateActionsVotingRightsType = CorporateActionsVotingRightsType.VotingRightsDate,
QueryStartDate = null,
NextDays = null,
QueryEndDate = null,
PendingEventsHours = null,
PendingEventsMinutes = null,
IncludeInstrumentsWithNoEvents = null,
IncludeNullDates = null,
//
// EXCLUDE DELETED EVENTS
//
ExcludeDeletedEvents = true,
IncludeCapitalChangeEvents = true,
IncludeDividendEvents = true,
IncludeEarningsEvents = true,
IncludeMergersAndAcquisitionsEvents = true,
IncludeNominalValueEvents = true,
IncludePublicEquityOfferingsEvents = true,
IncludeSharesOutstandingEvents = true,
IncludeVotingRightsEvents = true
},
}; 

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Christiaan Meihsl · Apr 20, 2016 at 05:09 AM

1) We are using CorporateActionsStandardExtractionRequest whereas I see that you are using CorporateActionsStandardReportTemplate – do you anticipate differences in behavior when using one class versus the other?

These are 2 different approaches to a similar goal. The choice depends on your use case.

CorporateActionsStandardExtractionRequest is used in the context of an On Demand (i.e. on the fly) extraction. The instrument list and report template are created dynamically, and are not saved on the DSS server. This is very easy to program and use. We have sample code for this, which you can find in the REST API Reference tree, under Extractions Context - Operations - Extract (select the scenario On Demand Extractions - Create - Standard Events (Corporate Actions)). Select tab C# full to see the entire code. You can also see and run the code in the C# example application, under On Demand Extractions - Create Standard Events (Corporate Actions). For detailed instructions on how to install and run it, see here.

CorporateActionsStandardReportTemplate is used to create a report template that is saved on the DSS server (you can check that using the DSS web GUI). That is useful if you want to create it once and for all, and reuse it later. We have sample code for this method, which you can find in the REST API Reference tree, under Extractions Context - Entities - Report Template (with Derived Entities) - Derived Entities - CorporateActionsStandardReportTemplate - Operations - Create (select the scenario Report Template Examples - Create - Standard Events (Corporate Actions).primary). Select tab C# full to see the entire code. You can also see and run the code in the C# example application, under Report Template Examples - Create Standard Events (Corporate Actions).

But this second method is not sufficient for an extraction. In this scenario you also need to create an instrument list on the DSS server, and a schedule for your extraction, after which you can retrieve the extracted data. This approach is similar to what you can do manually in the DSS GUI. For an explanation of the 2 approaches see here. For a complete code sample with all required steps using this 2nd approach (for EoD data, not Corax, but the idea is the same) see here.

2) If you look at our setting of the condition, you will see that we set our IncludeInstrumentsWithNoEvents to false whereas you set it to null, and we set our ReportDateRangeType to a string (“Last”) whereas you set it to whatever the value behind ReportDateRangeType.Delta is. Could this be causing issues? Do we need to set any other flags?

A) false vs null

Property IncludeInstrumentsWithNoEvents is a nullable boolean (type bool?). If you do not want to include instruments with no event data, then setting it to false is fine.

B) Last vs Delta

ReportDateRangeType is an enumerable that can have any of the following values: Delta, Init, Last, NoRange, Range. The difference between Delta and Last is the following:

  • Delta: Limit your extraction to only new and updated events that have occurred within a specified number of hours or days.
  • Last: Retrieve the most recent events available, regardless of when the data was last updated.

Depending on the chosen value, other properties must be set. For more info search for Delta in the DSS GUI help, then select Report Options for Corporate Actions.

C) Properties (flags) list

There are many more properties that can be set. The sample code mentioned in the answer to query 1 above illustrates them. If you need to set them or not depends on your use case. Defaults will be used for unset values.

3) Can you confirm that the code below works (i.e. that if you try to run it against a sedol with the excludedeleted flag set to true, then no retired shares will be returned)

The purpose of ExcludeDeletedEvents is to exclude deleted Corporate Actions.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
6 People are following this question.

Related Questions

Datascope, ReportExtractions response containing min values

Historical Timeseries Pricing extraction via DSS Rest API

How to use CorporateActions extractions

How to get RIC value currency using instrument search in rest api?

Retrieving upcoming earnings events, AGMs

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges