code to get live stock quotes in java
i have an app where i want to display the stock data, i googled n found that yahoo finance api provides such service. but i m unaware of how to fetch the stock quotes through java code, i refered Yahoo data download
if you go through the site then you ll see links such as http://finance.yahoo.com/d/quotes.cs...SFT&f=snd1l1yr to obtain the stock quotes
my question is that in my app i dont want the download dialogbox popping up everytime the stock quotes are to be refreshed/downloaded.
can you pls suggest some good java code for the same?
Re: code to get live stock quotes in java
Hope it is helpful
1. java.net.URL url = new java.net.URL("http://finance.yahoo.com/d/quotes.csv?s=XOM+BBDb.TO+JNJ+MSFT&f=snd1l1yr");
3. get the input stream by url.openStream()
4. do whatever you want