Search code examples
javajsfjakarta-eeyahoo-apiyahoo-finance

yahoo finance api in java


i have to get stock quotes from yahoo finance api n use it in my app do i need to include any jar to use yahoo finance api? i referred

http://developer.yahoo.com/forum/General-Discussion-at-YDN/Re-Using-Yahoo-Finance-API-Not/1250246255000-0b82f8f0-7f48-3af2-8fe2-e73a138cbfaa

which has a code to get the stock quotes but it is not using the api...

i also referred the following sites as given in

https://stackoverflow.com/questions/10635616/how-to-use-yahoo-finance-api-in-java#comment13787113_10635616

but i would like to get a head start in the same for coding... do i need to include any jar for this api in my java app? by referring to the above sites i came to know that the quotes come in excel sheet so how do i store the excel sheet in a particular location through code?


Solution

  • Did you read the code on that link?

    From the link provided by you:

    url = new URL("http://finance.yahoo.com/d/quotes.csv?s=RHT+MSFT&f=sb2b3jk");
    

    the code on the page itself provides a solution.

    No you don't need to add any external jars to use this.

    The code to store the file is also mentioned in the same link.