Hello,
I am trying to get bond schedule extraction from Reuter , below is my code. I am sending request for only ONE ISIN. But it returns 8 extraction Row. I want Single row with latest "Coupon Floor Rate" and "Coupon Cap Rate". How can I achieve this.
public class Program
{
private static ExtractionsContext extractionsContext;
private static Uri dssUri = new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/");
static void Main(string[] args)
{
var extractionsContext = new ExtractionsContext(new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/"), "userid", "pwd", clientSessionId: "24d26ef6-f602-49fe-a901-74490e6d5658");
extractionsContext.Preferences.WaitSeconds = 5;
var extractionRequestbond = new BondScheduleExtractionRequest
{
IdentifierList = InstrumentIdentifierList.Create(
new[] { new InstrumentIdentifier { Identifier = "XS0205055675", IdentifierType = IdentifierType.Isin },
}, null, false),
ContentFieldNames = new[] { "Coupon Floor Rate", "Coupon Cap Rate", "Asset Type" },
Condition = new BondScheduleCondition
{
BondScheduleTypeCodes = new[] { "COUP" }
}
};
ExtractionResult extraction = null;
ThomsonReuters.Dss.Core.RestApi.DssCollection<ExtractionRow> extractedRows = new ThomsonReuters.Dss.Core.RestApi.DssCollection<ExtractionRow>();
try
{
extraction = extractionsContext.ExtractWithNotes(extractionRequestbond);
extractedRows = extraction.Contents;
foreach (ExtractionRow extractonRow in extractedRows)
{
List<object> RowValues = new List<object>();
foreach (var field in extractonRow.DynamicProperties)
{
Console.WriteLine(field.Key + " : " + field.Value);
}
}
}
catch (Exception ex)
{
}
Console.ReadKey();
}
}