Problem in getting live quotes from yahoo finance

#1
Dear Members,

I am having a Java Scipt based utility for getting live quotes of Indian stocks from yahoo finance. But from 28th January 2013 the quotes for many symbols are not updating.
=================================
See quotes for jindal steel & power not updating
====================================
SYMBOL -----Last Traded P.CLOSE OPEN HIGH LOW
JINDALSTE.NS Jan 28 - 430.55 433.45 432.35 436.70 427.00

========================================
The quotes for following symbols started updating after adding" -EQ "
============================================
KFA- EQ.NS 5:04am - 11.10 10.60 11.00 11.10 10.75
MTNL-EQ.NS 5:04am - 23.30 23.55 23.50 23.60 23.25
NHPC-EQ.NS 5:05am - 28.80 28.70 28.70 29.15 28.25
SAIL-EQ.NS 5:04am - 81.10 80.75 80.60 81.60 79.70
TCS-EQ.NS 5:04am - 1410.00 1414.70 1409.05 1415.00 1401.85

========================================
Adding -EQ not worked in following scipts as limit of 9 characters in quote is surpassing so I have to suffix .BO instead of .NS and quotes delayed by 10 minutes.
========================================

BAJAJHIND.BO 4:54am - 22.80 22.90 22.95 22.95 22.55
COALINDIA.BO 4:54am - 345.00 338.75 340.00 347.00 337.50
GMRINFRA.BO 4:54am - 18.15 18.55 18.60 18.60 18.05
HINDALCO.BO 4:54am - 112.40 112.10 112.60 113.30 111.00
HUL.BO 4:54am - 459.10 460.80 457.50 464.95 457.50

============================================
Normal quotes
=============================================
^NSEI 5:08am - 5922.50 5897.85 5894.35 5927.65 5886.45
ABAN.NS 5:04am - 320.45 322.90 323.40 324.65 317.00
ASHOKLEY.NS 5:05am - 23.30 23.35 23.60 23.60 23.10
BHARTIART.NS 5:05am - 322.30 316.20 314.05 323.50 314.05
BHEL.NS 5:05am - 209.00 207.55 207.00 209.80 206.50
CAIRN.NS 5:05am - 318.20 315.85 316.30 319.45 315.70
CHAMBLFER.NS 5:05am - 65.15 65.45 65.80 65.80 64.35
DLF.NS 5:04am - 268.00 271.45 270.00 273.35 263.10
ESSAROIL.NS 5:05am - 89.65 91.05 91.05 92.20 88.45
HDIL.NS 5:05am - 70.40 72.15 72.80 72.80 66.10
ICICIBANK.NS 5:04am - 1131.00 1122.70 1121.50 1134.00 1114.10
IDBI-EQ.NS 5:04am - 100.35 99.70 99.70 101.40 98.75
IDEA.NS 5:04am - 111.50 109.70 109.50 111.90 108.35
IDFC.NS 5:05am - 155.55 157.90 157.20 158.40 153.65
IFCI.NS 5:05am - 33.25 34.10 34.15 34.50 32.45
INFY.NS 5:05am - 2756.55 2792.05 2770.00 2774.1001 2741.75
ITC.NS 5:05am - 300.10 299.15 298.50 300.95 298.00
JPASSOCIA.NS 5:05am - 72.85 72.75 71.85 73.10 69.10
LT.NS 5:04am - 1497.00 1489.85 1486.00 1503.00 1477.55
MOIL.NS 5:04am - 252.85 252.15 253.15 253.15 250.10
RCOM.NS 5:05am - 73.85 75.05 74.80 75.15 71.15
RELCAPITA.NS 5:05am - 441.45 444.70 446.70 447.55 434.10
RELIANCE.NS 5:05am - 876.50 868.40 868.60 880.35 865.10
SBIN.NS 5:05am - 2300.00 2294.3501 2301.00 2307.6001 2278.80
SUZLON.NS 5:05am - 23.80 24.85 24.75 24.85 23.70
TATAMOTOR.NS 5:05am - 298.05 290.90 294.25 299.85 291.45
TATASTEEL.NS 5:05am - 384.50 384.80 385.10 387.50 382.20

I am hereby giving the full code of my Java Scipt utility and request the seniors to guide me to retreive the quotes as i was getting before 28-01-13.

==============
CODE
==============

var watchList = "^NSEI+ABAN.NS+ASHOKLEY.NS+BAJAJHIND.BO+BHARTIART.NS+BHEL.NS+CAIRN.NS+CHAMBLFER.NS+COALINDIA.BO+DLF.NS+ESSAROIL.NS+GMRINFRA.BO+HDIL.NS+HINDALCO.BO+HUL.BO+ICICIBANK.NS+IDBI-EQ.NS+IDEA.NS+IDFC.NS+IFCI.NS+INFY.NS+ITC.NS+JINDALSTE.NS+JPASSOCIA.NS+KFA-EQ.NS+LT.NS+MOIL.NS+MTNL-EQ.NS+NHPC-EQ.NS+NTPC.NS+ONGC.NS+POWERGRID.NS+PSB.NS+PUNJLLOYD.BO+RCOM.NS+RELCAPITA.NS+RELIANCE.NS+LICHSGFIN.NS+RPOWER.NS+SAIL-EQ.NS+SBIN.NS+SUZLON.NS+TATAMOTOR.NS+TATASTEEL.NS+TCS-EQ.NS+ UNITECH.NS+WIPRO.NS";

String.prototype.replaceAll=function(s1, s2) {return this.split(s1).join(s2)};
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false;
}
}

if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp=false;
}
}

function init(){
fetchChartData();
}

function fetchChartData(){
setTimeout('sendAjaxRequest()', 30*1000);
}

function sendAjaxRequest(){
try {
xmlhttp.open("GET", "http://download.finance.yahoo.com/d/quotes.csv?s="+ watchList +"&f=sljkcpohgv&e=.csv",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
fetchChartDataCallback(xmlhttp);
}
}
xmlhttp.send(null)
} catch (e){
document.getElementById("Basu Bhaav").innerHTML = e.message;
}
}


function fetchChartDataCallback(request){
var response = request.responseText;
var response1 = response.replaceAll("\"","");
var response2 = response1.replaceAll("\n","</tr><tr><td>");
var response3 = response2.replaceAll(",","</td><td><font size='4'>");

var tableData = "" ;
tableData = "<table border='5' cellspacing='2' cellpadding='2'>";
tableData = tableData + "<tr>";
tableData = tableData + "<td><font size='4'><b>SYMBOL</b></font></td><td><font size='4'><b>LAST TRADED</b></font></td><td><font size='4'><b>52-LOW</b></font></td> <td><font size='4'><b>52-HIGH</b></font></td><td><font size='4'><b>CHANGE & %</b></font></td><td><font size='4'><b>P.CLOSE</b></font></td><td><font size='4'><b>OPEN</b></font></td><td><font size='4'><b>HIGH</b></font></td><td><font size='4'><b>LOW</b></font></td><td><font size='4'><b>VOLUME</b></font></td><td>";
tableData = tableData + "</tr>";
tableData = tableData + "<tr><td>" +response3 +"</td></tr>";
tableData = tableData + "</table>";
document.getElementById("instruction").innerHTML = "";
document.getElementById("Basu Bhaav").innerHTML = tableData;
fetchChartData();
}
===================
with regards
BASUDEO AGARWAL
 

Similar threads