Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By hei1233212000

Thread: code to get live stock quotes in java

  1. #1
    mark22 is offline Member
    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Default 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?
    thank you

  2. #2
    hei1233212000 is offline Member
    Join Date
    Jul 2010
    Posts
    36
    Rep Power
    0

    Default 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");
    2. url.openConnection();
    3. get the input stream by url.openStream()
    4. do whatever you want
    quad64bit likes this.

Similar Threads

  1. How to get live NSE stock quotes using java
    By nayal_java in forum Forum Lobby
    Replies: 3
    Last Post: 04-19-2012, 04:19 PM
  2. How to get live NSE stock quotes using java
    By nayal_java in forum New To Java
    Replies: 1
    Last Post: 04-19-2012, 01:35 PM
  3. Stock Feeds Code
    By javaderivatives in forum New To Java
    Replies: 1
    Last Post: 12-14-2011, 12:45 AM
  4. Unable to retrieve stock quotes from yahoo
    By the reporter in forum AWT / Swing
    Replies: 4
    Last Post: 06-03-2010, 05:10 PM
  5. Stock Quotes
    By BartDR in forum Advanced Java
    Replies: 0
    Last Post: 09-15-2009, 10:15 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •