Hello,
When running a multiple Rics On demand extraction, it returns only the first Ric.
The code I am using is the below code inspired from the DSS api example
What am I doing wrong?
Thank you for your help on this.
ExtractionsContext.Options.AutomaticDecompression = true; //Decompress gzip to plain text
// UTC start and endDate
var requestDate = new DateTime(2017, 7, 27);
var utcStartDate = requestDate.AddHours(8);
var utcEndDate = requestDate.AddHours(16);
var startDate = new DateTimeOffset(utcStartDate);
var endDate = new DateTimeOffset(utcEndDate);
var condition = new TickHistoryTimeAndSalesCondition
{
ReportDateRangeType = ReportDateRangeType.Range,
QueryStartDate = startDate,
QueryEndDate = endDate,
ApplyCorrectionsAndCancellations = false,
ExtractBy = TickHistoryExtractByMode.Ric,
MessageTimeStampIn = TickHistoryTimeOptions.GmtUtc,
SortBy = TickHistorySort.SingleByRic,
DisplaySourceRIC = true
};
var rics = new string[] { "AAL.L", "MMM.N" };
var instrumentIdentifiers = rics.Select(x => InstrumentIdentifier.Create(IdentifierType.Ric, x)).ToArray();
var indentifierList = new InstrumentIdentifierList { InstrumentIdentifiers = instrumentIdentifiers };
var request = new TickHistoryTimeAndSalesExtractionRequest
{
Condition = condition,
ContentFieldNames = FIELDS,
IdentifierList = indentifierList
};
Task<RawExtractionResult> resultTask;
RawExtractionResult result;
try
{
resultTask = ExtractionsContext.ExtractRawAsync(request);
result = await resultTask;
}
catch (Exception ex)
{
return;
}