download stock quote from yahoo

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • f

    download stock quote from yahoo

    I am writing an app in which I need to get the stock quote from Yahoo.
    Idealy, I will get a stream from Yahoo's web site and parse that as
    string and display the information (price, PE, volumn...).

    What class should I use?

    If you use "http://finance.yahoo.c om/d/quotes.csv?s=YH OO&f=sl1d1t1c1o hgv&e=.csv"
    as URL in HttpConnection, you will download a file. How can I obtain a
    stream? Is there other URL in Yahoo's site I can get a stream?

    Thanks,

    ff
  • Andrew Thompson

    #2
    Re: download stock quote from yahoo

    f wrote:[color=blue]
    > I am writing an app in which I need to get the stock quote from Yahoo.
    > Idealy, I will get a stream from Yahoo's web site and parse that as
    > string and display the information (price, PE, volumn...).
    >
    > What class should I use?
    >
    > If you use
    > "http://finance.yahoo.c om/d/quotes.csv?s=YH OO&f=sl1d1t1c1o hgv&e=.csv"
    > as URL in HttpConnection, you will download a file. How can I obtain
    > a
    > stream? Is there other URL in Yahoo's site I can get a stream?
    >
    > Thanks,
    >
    > ff[/color]


    Comment

    • Andrew Thompson

      #3
      Re: download stock quote from yahoo

      ...hmm. Let's try that again, with some text this time.

      Andrew Thompson wrote:[color=blue]
      > f wrote:[color=green]
      >> I am writing an app in which I need to get the stock quote from
      >> Yahoo.[/color][/color]

      Good for you. I am reading a group for
      c.l.j.programme r's, where folks are
      supposed to already know how to consult
      the JavaDocs.

      Your message indicates that you have not,
      and possibly are unaware of their existence.

      Please confine your posts to c.l.j.help
      for the moment, at least unitl you can
      figure how to use the JavaDocs and
      ask smart questions on usenet.

      --
      Andrew Thompson
      * http://www.PhySci.org/ Open-source software suite
      * http://www.PhySci.org/codes/ Web & IT Help
      * http://www.1point1C.org/ Science & Technology


      Comment

      • Peter Astbury

        #4
        Re: download stock quote from yahoo

        After that reply you are probably thinking "does everyone in this
        newsgroup have a stick up their ****?" The answer is 'no'.

        Andrew Thompson, if you can't or don't want to help then just don't
        reply to the post, there's no need to bite people's heads off.

        f. To answer your question. Try adapting the following code for your
        application:

        // Read an http resource in to a stream
        String tAddress = "http://domain/path/to/resource/file.ext";
        URL tDocument = new URL(tAddress);
        URLConnection tConnection = tDocument.openC onnection();
        tConnection.con nect();
        BufferedReader tBufferedReader = new BufferedReader
        (new InputStreamRead er(tDocument.op enStream()));

        then read the stream as you would with any other BufferedReader object
        (keyboard input, for example).

        Hope this is a bit more helpful than Andrew's reply.

        Andrew Thompson wrote:[color=blue]
        > ..hmm. Let's try that again, with some text this time.
        >
        > Andrew Thompson wrote:
        >[color=green]
        >>f wrote:
        >>[color=darkred]
        >>>I am writing an app in which I need to get the stock quote from
        >>>Yahoo.[/color][/color]
        >
        >
        > Good for you. I am reading a group for
        > c.l.j.programme r's, where folks are
        > supposed to already know how to consult
        > the JavaDocs.
        >
        > Your message indicates that you have not,
        > and possibly are unaware of their existence.
        >
        > Please confine your posts to c.l.j.help
        > for the moment, at least unitl you can
        > figure how to use the JavaDocs and
        > ask smart questions on usenet.
        >
        > --
        > Andrew Thompson
        > * http://www.PhySci.org/ Open-source software suite
        > * http://www.PhySci.org/codes/ Web & IT Help
        > * http://www.1point1C.org/ Science & Technology
        >
        >[/color]

        Comment

        • Berlin Brown

          #5
          Re: download stock quote from yahoo

          f wrote:[color=blue]
          > I am writing an app in which I need to get the stock quote from Yahoo.
          > Idealy, I will get a stream from Yahoo's web site and parse that as
          > string and display the information (price, PE, volumn...).
          >
          > What class should I use?
          >
          > If you use "http://finance.yahoo.c om/d/quotes.csv?s=YH OO&f=sl1d1t1c1o hgv&e=.csv"
          > as URL in HttpConnection, you will download a file. How can I obtain a
          > stream? Is there other URL in Yahoo's site I can get a stream?
          >
          > Thanks,
          >
          > ff[/color]

          I haven't looked at the yahoo finance page, but I am sure they have a
          rss or XML tag somewhere and you can get the quote. I dont much trust
          csv or plain text. (that is just me)

          Comment

          • Berlin Brown

            #6
            Re: download stock quote from yahoo

            Peter Astbury wrote:[color=blue]
            > After that reply you are probably thinking "does everyone in this
            > newsgroup have a stick up their ****?" The answer is 'no'.
            >
            > Andrew Thompson, if you can't or don't want to help then just don't
            > reply to the post, there's no need to bite people's heads off.
            >
            > f. To answer your question. Try adapting the following code for your
            > application:
            >
            > // Read an http resource in to a stream
            > String tAddress = "http://domain/path/to/resource/file.ext";
            > URL tDocument = new URL(tAddress);
            > URLConnection tConnection = tDocument.openC onnection();
            > tConnection.con nect();
            > BufferedReader tBufferedReader = new BufferedReader
            > (new InputStreamRead er(tDocument.op enStream()));
            >
            > then read the stream as you would with any other BufferedReader object
            > (keyboard input, for example).
            >
            > Hope this is a bit more helpful than Andrew's reply.
            >
            > Andrew Thompson wrote:
            >[color=green]
            >> ..hmm. Let's try that again, with some text this time.
            >>
            >> Andrew Thompson wrote:
            >>[color=darkred]
            >>> f wrote:
            >>>
            >>>> I am writing an app in which I need to get the stock quote from
            >>>> Yahoo.[/color]
            >>
            >>
            >>
            >> Good for you. I am reading a group for
            >> c.l.j.programme r's, where folks are
            >> supposed to already know how to consult
            >> the JavaDocs.
            >>
            >> Your message indicates that you have not,
            >> and possibly are unaware of their existence.
            >>
            >> Please confine your posts to c.l.j.help
            >> for the moment, at least unitl you can
            >> figure how to use the JavaDocs and
            >> ask smart questions on usenet.
            >>
            >> --
            >> Andrew Thompson
            >> * http://www.PhySci.org/ Open-source software suite
            >> * http://www.PhySci.org/codes/ Web & IT Help
            >> * http://www.1point1C.org/ Science & Technology
            >>
            >>[/color][/color]
            Personally I like the comments, I think they are real and I learn more
            if people are direct and to the point as opposed to wishy-washy. We are
            programmer, we have thick skins.

            Comment

            • f

              #7
              Re: download stock quote from yahoo

              You are sick and fuck you JavaDocs.


              "Andrew Thompson" <SeeMySites@www .invalid> wrote in message news:<xGPYb.654 [email protected]. net.au>...[color=blue]
              > ..hmm. Let's try that again, with some text this time.
              >
              > Andrew Thompson wrote:[color=green]
              > > f wrote:[color=darkred]
              > >> I am writing an app in which I need to get the stock quote from
              > >> Yahoo.[/color][/color]
              >
              > Good for you. I am reading a group for
              > c.l.j.programme r's, where folks are
              > supposed to already know how to consult
              > the JavaDocs.
              >
              > Your message indicates that you have not,
              > and possibly are unaware of their existence.
              >
              > Please confine your posts to c.l.j.help
              > for the moment, at least unitl you can
              > figure how to use the JavaDocs and
              > ask smart questions on usenet.[/color]

              Comment

              Working...