Seems that Yahoo! no longer provides yahoo.finance.quotes table(s). You can see all available tables in YQL console. (http://developer.yahoo.com/yql/console/)
Yahoo finance API No definition found for Table yahoo.finance.quotes
-
15-10-2022 - |
Question
So when I open this in my browser
<?php
$endpoint = "http://query.yahooapis.com/v1/public/yql";
$query = urlencode('select * from yahoo.finance.quotes where symbol in ("ABBY.L")');
$ch = curl_init($endpoint.'?q='.$query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
if (curl_error($ch)){
die(curl_error($ch));
}
curl_close($ch);
echo'<pre>';
//$result = json_decode($result);
print_r($result);
?>
I get the error No definition found for Table yahoo.finance.quotes. I was wondering if anyone had a fix to this. Any help would be great. Thanks!
Solution 2
OTHER TIPS
Add &env=http://datatables.org/alltables.env to your query.
Attention: URL is not encoded to make it more readable, please be careful: For example: http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT")&env=http://datatables.org/alltables.env
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow