I fetch Stock Data of particular stocks using YQL-yahoo finance API as below.
select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=INFY.BO,RELIANCE.NS,TCS.BO&f=sl1d1t1c1ohgv&e=.csv' and columns='symbol,price,date,time,change,col1,high,low,col2'
But I want to fetch All World exchanges indices price.So i try like this,
select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=BSESN&f=sl1d1t1' and columns='symbol,price,date,time'
I does not works.
1.How to fetch all World Stock Exchanges price from YQL-yahoo finance API? Is it possible to do?
2.Is it possible to fetch History stock data from YQL-yahoo finance API for a timeperiod?
1.How to fetch all World Stock Exchanges price from YQL-yahoo finance API? Is it possible to do?
The symbol for BSESN is wrong. It should be ^BSESN
(Similarly you can try other stock exchanges eg: Taiwan ^TWII
)
The YQL query would be: select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=%5EBSESN&f=sl1d1t1' and columns='symbol,price,date,time'
You can try the above query here. You also need to encode the ^
.
In order to get the correct symbols, go to Yahoo! Finance site and search for the symbol. Searching for BSESN opens the BSE Sensex page and the symbol you need should be in the brackets.
eg:BSE SENSEX (^BSESN)
2.Is it possible to fetch History stock data from YQL-yahoo finance API for a timeperiod?
This I am not sure how to do (not sure if the API's even support it). Take a look at this page. Might be helpful.