2
votes

I have been trying to fetch the stock quotes from Yahoo finance, but I have not been able to get that.

I have tried YQL Console, and it is working fine in that https://developer.yahoo.com/yql/console/#h=select+*+from+pm.finance+where+symbol%3D%22SBIN.BO%22.

Here they are using pm.finance table to fetch the stock quote.

URL for accessing the REST URL it in browser here

If you will try to open the rest URL in the browser it gives you error:

{"error":{"lang":"en-US","description":"Authentication Error. The table pm.finance requires a higher security level than is provided, you provided ANY but at least APP is expected"}}

So for this I created a Yahoo App for this, so that I will be able to access using CURL request Created App on - https://developer.yahoo.com/apps/

But now I am not able to get how to use this app to make a CURL request and get the quotes.

I have also tried http://download.finance.yahoo.com/d/quotes.csv?s=sbin.bo&f=sl1d1t1c1ohgv

But here I am not getting information about the quotes.

Please help me, how to get the stock quotes. I also know about Google finance API and have implemented that but client is specific about using Yahoo API.

Thanks in advance

1
Do you have an Yahoo! account? Even the simplest query select * from pm.finance where symbol="YHOO" returns the same result: Authentication Error. The table pm.finance requires a higher security level than is provided, you provided ANY but at least APP is expected. You'l need an Yahoo! account though. Maybe this answer could help you more than my comment.Mauricio Arias Olave
Yes I have yahoo account, and I have created the app also. But I guess the answer which you have tagged is not much use now, as it is of year 2012. I am stuck at how to use that app in making REST call so that yahoo consider me authenticated person. And I totally fine with the limits which they have applied.DASH
@DASH use this instead of pm.finance https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22AAPL%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback= Do you able to solve the issue?user7983871
@behappy have you are tried the URL which you have commented, as I think Yahoo does not uses this table anymore. Regarding solving the issue, no I could not find any solution for this.DASH

1 Answers

0
votes

Yahoo has discontinued their stock quote API. Try the Investor's Exchange API instead.