For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Not Receiving Data using Eikon Data API for Futures

We are not receiving data using API. Kindly assist. We have seen values before. Futures does not get us data. SPY works fine.

Sample RIC: <VXc1>

Sample Code:

var eikon = EikonDataAPI.Eikon.CreateDataAPI();
eikon.SetAppKey("<app key>");

List<string> fields = new List<string> {
"TR.SettlementPrice","TR.SettlementPrice.Date"

};

var parameters = new Dictionary<string, string>()
{
{"SDate", fromDate.ToString("yyyy-MM-dd")}, {"EDate", toDate.ToString("yyyy-MM-dd")},
{"Frq", "D"}, {"CH", "Fd"}
};

ry
{
data = eikon.GetData(items, fields, parameters);
break;
}
catch (Exception ex)
{
System.Console.WriteLine("Attempt " + i);
ErrorLogger.Error(ex);

}

for (int i = 0; i < data.RowCount; i++)
{

String instrument = String.Empty;
try
{
var series = data.Rows[i];
instrument = series["Instrument"].ToString();
var asofDate = Convert.ToDateTime(series["Date"].ToString());
var settlePrice = Convert.ToDouble(series["Settlement Price"]);
settlePriceDictionary[instrument + asofDate.ToString("MM/dd/yyyy")] = settlePrice;

}
catch (Exception ex)
{
System.Console.WriteLine("Cannot get settlement price for "
+ instrument + " : " + ex.Message);
}
}


Thank you!

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@AndreaErica.Simbolas

I can get the data properly with the code below.

List<string> instruments = new List<string> {
   "VXc1"
};

List<string> fields = new List<string> {
"TR.SettlementPrice","TR.SettlementPrice.Date"
};

var parameters = new Dictionary<string, string>()
{
{"SDate", "2021-09-01"}, {"EDate", "2021-09-20"},
{"Frq", "D"}, {"CH", "Fd"}
};
var data = eikon.GetData(instruments, fields, parameters);
data

The output is edapi.png

You may need to enable logging in the API to verify the problem.

using Microsoft.Extensions.Logging;
...
eikon.GetLoggerFactory().AddConsole(LogLevel.Debug);



edapi.png (29.3 KiB)
icon clock
10 |1500

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

Click below to post an Idea Post Idea