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!