Instrument API fetching 0.00 last price for all instruments

maxhiten
for(i=0;i<instr.Count();i++)
{
if (instr[i].InstrumentType=="EQ")
{
try
{
SqlCommand cmd5 = new SqlCommand("INSERT INTO instr VALUES (@name,@ltp)", con);
cmd5.Parameters.AddWithValue("@name", instr[i].TradingSymbol);
cmd5.Parameters.AddWithValue("@ltp", instr[i].LastPrice);
cmd5.ExecuteNonQuery();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
  • sujith
    You need to use Quote API to fetch live market. Instruments master dump is created early in the morning, it will not have live market data.
  • maxhiten
    I am not asking for live market data. Instrument is supposed to give some ltp value instead of giving 0.00 (which actually it was doing from the start). Why sudden change?
  • maxhiten
    Or if you have changed your ltp data to 0.00 for instrument then please confirm.
  • sujith
    We haven't changed anything, it has always been 0. We don't get values from upstream when this file is generated.
Sign In or Register to comment.