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
Question by pascal.falbo · Apr 21, 2017 at 05:37 AM · dss-rest-apidssdatascope-selectc#

Extract OnDemand in C# example always end up with no data

Hi,

We are currently migrating our old SOAP API solution to the REST API. I'm trying to extract data with the C# example provided here (report template is Terms and Condition), but for some reason, it seems that the instrument provided (Ric:IBM.N) always return 0 rows in output. I tried with several instruments then, I always end up with an empty extraction. When I try to extract those same instruments with the SOAP API, I get results.

Could someone give me some explanation about this behaviour? I precise that I changed nothing in the sample, I used the same credentials as our SOAP API script.

Many thanks!

The concerned method:

        [Example("Create: Terms and Conditions")]
        public void TermsAndConditions()
        {
            Status.Notify(ExtractionsContext, "ReportTemplateType", "GetContentFieldTypes");
            //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.TermsAndConditions);
            Status.EndNotify(ExtractionsContext);

            Status.Notify(ExtractionsContext, null, "ExtractWithNotes", MethodType.Operation, Publish.Secondary);
            //Create new report template with conditions
            var extractionRequest = new TermsAndConditionsExtractionRequest
            {
                IdentifierList = InstrumentIdentifierList.Create(
                    new[] { new InstrumentIdentifier { Identifier = "IBM.N", IdentifierType = IdentifierType.Ric } }, null, false),
                ContentFieldNames = new[] {
                    "Conversion Terms End Date", "Index Principal Flag", "Conversion Terms Start Date", "RIC", "Round Lot Size",
                    "Redemption Value", "Original Issue Amount", "Issue Price", "First Coupon Date", "Issue Date", "Par Value",
                    "Accrual Date", "Base Index", "Factor", "Original Issue Discount Flag", "End Of Month Payment Flag", "ISIN",
                    "Index Linked Bond Base Index", "Coupon Frequency Description", "Total Amount Outstanding", "Maturity Date",
                    "Total Amount Issued", "Capitilization Flag", "Currency Code", "Trading Status"},
                Condition = new TermsAndConditionsCondition
                {
                    IssuerAssetClassType = IssuerAssetClassType.AllSupportedAssets,
                    ExcludeWarrants = false,
                    DaysAgo = 3, //Use either DaysAgo or StartDate
                    //StartDate = new DateTimeOffset(new DateTime(2015, 1, 1)),
                    FixedIncomeRatingSources = FixedIncomeRatingSource.StandardAndPoors,
                }
            };

            //Extract - NOTE: If the extraction request takes more than 30 seconds the async mechansim will be used.  See Key Mechanisms 
            var extractionResult = ExtractionsContext.ExtractWithNotes(extractionRequest);
            var extractedRows = extractionResult.Contents;

            //Output
            if (!extractedRows.Any())
                Status.WriteLine("No rows returned");
            else
            {
                foreach (var row in extractedRows)
                    Status.WriteLine(
                        row.Identifier + " (" + row.IdentifierType + ") " +
                        String.Join(", ", row.DynamicProperties.Select(dp => dp.Key + "=" + dp.Value)));
                        }
            //Output Notes
            Status.WriteLine("NOTES:");
            foreach (var note in extractionResult.Notes)
                Status.WriteLine(note);
            Status.EndNotify(ExtractionsContext);
        }

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.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by veerapath.rungruengrayubkul · Apr 21, 2017 at 06:35 AM

@pascal.falbo

I have tried your code and found the same result. The extraction note also provides more information why there is no result returned.

Report Template (31 fields): _OnD_0x05b03fe60d5b2f96 (ID = 0x05b03fe60f4b2f96) Created: 04/21/2017 16:50:28 Last Modified: 04/21/2017 16:50:28
1 Instrument suppressed due to rating date not on or after 04/18/2017.
Processing completed successfully at 04/21/2017 16:50:36, taking 0.240 Secs.
Extraction finished at 04/21/2017 09:50:36 UTC, with servers: x11n01, DSHA02 (0.0 secs), QSHA02 (0.0 secs), QSHC08 (0.0 secs)
No usage to report -- 1 Instrument in the input list had no reported data.

Once I remove the code that defines the TermsAndConditionsCondition, application can retreive some data in fields. It seems like the issue is related to the content of data or the attributes of the request.

Comment

People who like this

0 Show 2 · 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.

avatar image
REFINITIV
veerapath.rungruengrayubkul ♦♦ · Apr 21, 2017 at 06:49 AM 0
Share

I have also tried the Schedule extraction in GUI and found similar behavior. There will be no result, if the Delta Extraction is selected.

deltaextraction.png (28.4 KiB)
avatar image
pascal.falbo · Apr 21, 2017 at 08:45 AM 0
Share

Thanks very much, for now I don't really need the conditions so your solution do the trick. I'll try to investigate further when I have some time.

avatar image
REFINITIV
Answer by Christiaan Meihsl · Apr 21, 2017 at 05:55 AM

@pascal.falbo

Where did you get this sample from ? It might be an old one, I do not recognize it.

The current samples for the DSS REST API are available under the downloads tab of the DSS REST API. Among them is a working C# example for an On Demand Terms and Conditions extraction, it is explained in detail under Tutorial 8. It contains several instruments including IBM.N, and delivers data, I just retested it right now.

Later addition to this answer:

After further tests trying to understand why the current sample returns data and yours does not, I found that the presence of the conditions DaysAgo and FixedIncomeRatingSources will result in no data being returned. Without those 2 conditions, the request should return data.

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 >
11 People are following this question.

Related Questions

Missing completed extraction returned via API

Trying to use DSS SDK Seach and I am getting a System.TypeLoadException Exception

How to get all items from result of search request

Problems extracting NG-W-HH-SNL via .NET

How to retrieve the full set of FID details available in TickHistoryRaw using the .NET API?

  • 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