Multiple Rics On demand extraction returns only one Ric

sd
sd Newcomer

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

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Christiaan Meihsl
    Answer ✓

    @sd, I just tried modifying our latest .Net sample 5 (it was updated on 28 June, along with the related tutorial), available from the downloads tab, to make the same request you make. It delivers data for several instruments (I tried with 5 RICs: ALVG.DE, AAL.L, IBM.N, MMM.N,0001.HK).

    I attached the modified Program.cs file that requests the same data as you programcs.txt (modified the extension). Note that it reads the RICs from a file.

    To install and run the code refer to .Net tutorial 1.

    Hope this helps.

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.