0

YQL fails to retrieve data from Yahoo Finance

Hello all,

I hope this is the correct forum to address the problem I face while using YQL.

I am currently using YQL to retrieve data from Yahoo! Finance.

However, I realize that, YQL will return incorrect result randomly.

I try to simulate this behavior, when Malaysia market is closed. I test it around 7:45pm (GMT +8)

QUOTE
select Name from yahoo.finance.quotes where symbol in ("5110.KL")


Correct Result
==============
cbfunc({
"query": {
"count": 1,
"created": "2011-02-10T11:39:53Z",
"lang": "en-US",
"results": {
"quote": {
"Name": "UOA REITS"
}
}
}
});


Wrong Result (Happens randomly)
===============================
cbfunc({
"query": {
"count": 1,
"created": "2011-02-10T11:40:07Z",
"lang": "en-US",
"results": {
"quote": {
"Name": "REITS"
}
}
}
});


Link to simulate this problem is

http://developer.yahoo.com/yql/console/?q=select%20Name%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(% 225110.KL%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env://http://developer.yahoo.com/yql/cons...2Falltables.env

It happens, says, if you keep pressing "Test" button around 20 times in high frequency.

I try to get the Yahoo! Finance result directly from CSV. But no luck, the same problem occur.

QUOTE
http://download.finance.yahoo.com/d/quotes...ohgv&e=.csv

Wrong Result (Happens randomly)
===============================
"5110.KL","REITS",1.46,"2/10/2011","3:10am",+0.03,1.46,1.46,1.46,1000

Correct Result
==============
"5110.KL","UOA REITS",1.46,"2/10/2011","3:10am",+0.03,1.46,1.46,1.46,1000


Thanks.

by
5 Replies
  • Just some additional add-on. The expected result is that, stock name should be "UOA REITS". This problem occurs in other stock markets like Hong Kong, United Kingdom...
    0
  • The link to run YQL is http://y.ahoo.it/WrcQ1ote
    0
  • More example on US Stock Market. I get null every-time I test on Citibank and Coco-Cola

    QUOTE
    select Name from yahoo.finance.quotes where symbol in ("C","KO","GOOG","MSFT")



    QUOTE
    cbfunc({
    "query": {
    "count": 4,
    "created": "2011-02-13T14:42:01Z",
    "lang": "en-US",
    "diagnostics": {
    "publiclyCallable": "true",
    "redirect": {
    "from": "http://datatables.org/alltables.env",
    "status": "301",
    "content": "http://www.datatables.org/alltables.env"
    },
    "url": [
    {
    "execution-time": "1",
    "proxy": "DEFAULT",
    "content": "http://www.datatables.org/yahoo/finance/yahoo.finance.quotes.xml"
    },
    {
    "execution-time": "8",
    "proxy": "DEFAULT",
    "content": "http://download.finance.yahoo.com/d/quotes.csv?f=aa2bb2b3b4cc1c3c6c8dd1d2ee1e7e8e9ghjkg1g3g4g5g6ii5j1j3j4j5j6k1k2k4k5ll1l2l3mm2
    m3m4m5m6m7m8nn4opp1p2p5p6qrr1r2r5r6r7ss1s7t1t7t8vv1v7ww1w4xy&s=C,KO,GOOG,MSFT"
    },
    {
    "execution-time": "8",
    "content": "select * from csv where url=@url and columns='Ask,AverageDailyVolume,Bid,AskRealtime,BidRealtime,BookValue,Change&PercentChange,Change,Commission,ChangeRealtime,AfterHoursChangeRealtime,Divi
    dendShare,LastTradeDate,TradeDate,EarningsShare,ErrorIndicationreturnedforsymbolc
    hangedinvalid,EPSEstimateCurrentYear,EPSEstimateNextYear,EPSEstimateNextQuarter,D
    aysLow,DaysHigh,YearLow,YearHigh,HoldingsGainPercent,AnnualizedGain,HoldingsGain,
    HoldingsGainPercentRealtime,HoldingsGainRealtime,MoreInfo,OrderBookRealtime,Marke
    tCapitalization,MarketCapRealtime,EBITDA,ChangeFromYearLow,PercentChangeFromYearL
    ow,LastTradeRealtimeWithTime,ChangePercentRealtime,ChangeFromYearHigh,PercebtChan
    geFromYearHigh,LastTradeWithTime,LastTradePriceOnly,HighLimit,LowLimit,DaysRange,
    DaysRangeRealtime,FiftydayMovingAverage,TwoHundreddayMovingAverage,ChangeFromTwoH
    undreddayMovingAverage,PercentChangeFromTwoHundreddayMovingAverage,ChangeFromFift
    ydayMovingAverage,PercentChangeFromFiftydayMovingAverage,Name,Notes,Open,Previous
    Close,PricePaid,ChangeinPercent,PriceSales,PriceBook,ExDividendDate,PERatio,Divid
    endPayDate,PERatioRealtime,PEGRatio,PriceEPSEstimateCurrentYear,PriceEPSEstimateN
    extYear,Symbol,SharesOwned,ShortRatio,LastTradeTime,TickerTrend,OneyrTargetPrice,
    Volume,HoldingsValue,HoldingsValueRealtime,YearRange,DaysValueChange,DaysValueCha
    ngeRealtime,StockExchange,DividendYield'"
    }
    ],
    "javascript": {
    "execution-time": "48",
    "instructions-used": "272729",
    "table-name": "yahoo.finance.quotes"
    },
    "user-time": "70",
    "service-time": "9",
    "build-version": "10970"
    },
    "results": {
    "quote": [
    {
    "Name": null
    },
    {
    "Name": null
    },
    {
    "Name": "Google Inc."
    },
    {
    "Name": "Microsoft Corpora"
    }
    ]
    }
    }
    });
    0
  • I'm having the exact same problem.

    What's going on yahoo?
    0
  • Hi.,


    am having a similar issue, even though in my case
    it will always output information but not complete.

    an example query would be:
    http://query.yahooapis.com/v1/public/yql?q...tables.env'

    normally it should return a result with 66 indexes, but that will be random.
    most of the time it returns only half of the information 33 indexes. (you can see that by looking at the source of the result page)

    How to stabilize the result? and always get the 66 indexes?

    thanks
    0

Recent Posts

in YQL