Upgrade from Eikon -> Workspace. Learn about programming differences.

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-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
78.1k 246 52 72

@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 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.