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); }