I need to display the charts for stocks trading in bse and nse. After a lot of searching i realised that there is no api that provides the graphs of companies(or am i mistaken here. If you guys know of any service that provide charts please let me know). THe only way out was to query yahoo finance for historic data and create the chart using jfreechart myself using that data. Firstly i would like to know how to query yahoo for historic data related to a particular stock symbol. Secondly is there any good tutorial on how to create Jfreecharts(it must be a line chart) using the data from yahoo.
Asked
Active
Viewed 5,850 times
1
-
1If you just want to look at historic data yourself, you can use Yahoo Finance, Bing Finance, or Google Finance. If you want to display historic data in an application that you make any money off of, you'll probably have to pay in order to stay within these sites' license terms. I'm not a lawyer, but be aware that you'll have to tread somewhat carefully. – Adam Mihalcin Mar 30 '12 at 03:43
1 Answers
2
This link code will help u out from fetching data from yahoo.
or u can do it using The ichart service is designed to be very simple to use, you can test it by just hitting with your browser on: http://ichart.finance.yahoo.com/table.csv?s=YHOO&a=06&b=9&c=1996&d=06&e=20&f=2010&g=d

twister_void
- 1,377
- 3
- 13
- 31
-
I had already gone through the link you posted. The ichartservice is pretty good but if you see the dates are not on the csv file.(Only a few of them exist). I would have to create a graph using this data. So that means the date field would be an absolute necessity. Also in the yql console i dont see a tab for yahoo finance services. Why is that.Is there any method of downloading graphs directly from yahoo using the company symbol. – user1092042 Mar 30 '12 at 03:55
-
1u might use  source – twister_void Mar 30 '12 at 04:34
-
-
u may see [this](http://stackoverflow.com/questions/6078785/are-there-any-good-client-side-stock-charting-libraries-out-there) question is ur problem get solve then tick as right answer – twister_void Mar 30 '12 at 05:04
-
So does that mean i have to create my own chart from the historic data i get.(The links you posted were for graph creation and not getting stock graphs.) – user1092042 Mar 30 '12 at 05:11
-