Yahoo Query Language Problem
Posted
by Damiano
on Stack Overflow
See other posts from Stack Overflow
or by Damiano
Published on 2010-05-08T08:18:46Z
Indexed on
2010/05/08
8:48 UTC
Read the original article
Hit count: 301
Hello everybody!
Today, I've started with Yahoo Query Language. I would use it to retrive stocks details, so I'm talking about Yahoo Finance.
I think there is a bug on this language. This is my query:
select * from yahoo.finance.quoteslist where symbol='@^GSPC'
I ALWAYS get 51 results!
it's impossible, take a look at: http://it.finance.yahoo.com/q/cp?s=^GSPC
There are 500 results!
I also tried some paging parameters.
select * from yahoo.finance.quoteslist(50,30) where symbol='@^GSPC' (to get from 50 to 80)
select * from yahoo.finance.quoteslist(100) where symbol='@^GSPC' (to get the first 100 results)
select * from yahoo.finance.quoteslist where symbol='@^GSPC' limit 30 offset 50
but ALWAYS the last stock is:
<quote symbol="BBY">
<Symbol>BBY</Symbol>
<LastTradePriceOnly>41.03</LastTradePriceOnly>
<LastTradeDate>5/7/2010</LastTradeDate>
<LastTradeTime>4:00pm</LastTradeTime>
<Change>-0.48</Change>
<Open>41.35</Open>
<DaysHigh>42.35</DaysHigh>
<DaysLow>39.60</DaysLow>
<Volume>14129531</Volume>
</quote>
Why do I have this kind of problem?
Thank you so much for your support!
(P.S. I've tested it on Yahoo YQL console)
© Stack Overflow or respective owner