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.

@AndreaErica.Simbolas

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

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