question

Upvotes
Accepted
0 2 4 6

Data Extraction issue with Reuters DSS C# API

We are not able to extract EOD data for few expired contracts as per the defined start & end dates using C# .NET DSS API. And we are successfully able to extract data from Reuters DSS (User interfaces) for the same expired contract. I have checked the Developer forum but didn't get any positive response.


Below expired contracts are
1. Brent 2019

2. GasOil - 2017, 2018, 2019

3. KCBTWheat - 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019

4. CBOTWheat - 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019


Sample Code

public void PullDailyData()
{
var start = new DateTimeOffset(2017, 3, 30, 0, 0, 0, TimeSpan.FromHours(0));
var end = new DateTimeOffset(2019, 2, 28, 23, 59, 59, TimeSpan.FromHours(0));
ElektronTimeseriesExtractionRequest dailyCandle = new ElektronTimeseriesExtractionRequest
{
IdentifierList = new InstrumentIdentifierList()
{
InstrumentIdentifiers = new[] {
new InstrumentIdentifier{ Identifier= "LCOJ9", IdentifierType=IdentifierType.Ric}
}
},
Condition = new ElektronTimeseriesCondition
{
ReportDateRangeType = ReportDateRangeType.Range,
QueryStartDate = start,
QueryEndDate = end
},
ContentFieldNames = new[] { "Settlement Price", "Trade Date" }
};
var extractionResult = client.context.ExtractWithNotes(dailyCandle);
var extractRows = extractionResult.Contents;
if (extractRows.Any() && extractRows.Count > 1)
{
foreach (var row in extractRows)
{
Console.WriteLine($"{row.Identifier}, {row.DynamicProperties["Settlement Price"]},{row.DynamicProperties["Trade Date"]}");
}
}
}


dss-rest-apitick-history-rest-apic#extraction
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@ziaul - This is a private post

Considering your query, we moved it from the DSS to the TRTH forum, it seems more appropriate (the ElektronTimeSeries request is a TRTH request), and will help people discover it.

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
13.7k 26 8 12

@ziaul,

By default On Demand API requests do not deliver data for expired contracts, because On Demand extractions do not take the User Preferences set in the GUI into consideration.

For an On Demand extraction to deliver data for historical instruments (expired contracts are historical instruments), this must be specified in the request. This is explained here in the Tutorials introduction. This is done using the instrument validation options, as described here in the TRTH .Net tutorial 5.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.