1
votes

I have created and API on deevloper.yahoo.com and in yql console https://developer.yahoo.com/yql/console.

Tick show community table and search for finance.

I got result of stock data.Here I got exact data for historical data in josn and xml format.

Link for historical data yahoo.finance.historicaldata.

like I got all data

http://finance.yahoo.com/q/hp?s=AAPL+Historical+Prices and rest query for this stock is

yql?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20%3D%20%22YHOO%22%20and%20startDate%20%3D%20%222009-09-11%22%20and%20endDate%20%3D%20%222010-03-10%22&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=

when I try to other stocks like yahoo.finance.balancesheet and other stock

I see the parameter I send in url is wrong specially where condition in other stock option

Can any one tell what will be exact url for other stock option.

1

1 Answers

0
votes

What you appear to want is:

https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.historicaldata where symbol = "YHOO" and startDate = "2009-09-11" and endDate = "2010-03-10"&format=json&diagnostics=true&env=store://datatables.org/alltableswithkeys&callback=

You can feed that URL to, for instance, wget, and it will return a blob of JSON.

Where did I get that URL? I started the YQL Console with Show Community Tables checked. Next, I entered your query (the q parameter in the above) and received back valid looking JSON. Finally, I went down to the bottom of the page, where it says THE REST QUERY in green, and copied the URL out of the box.