none
Stock Quotes RRS feed

  • Question

  • Hello

    I am trying to stock qoute program.  I pretty much have an idea of how to do it but my main question is how do i retreive the information from yahoo finance. 

    thxs in advance
    Tuesday, January 20, 2009 4:03 AM

Answers

  • in2it said:

    I am trying to stock qoute program.  I pretty much have an idea of how to do it but my main question is how do i retreive the information from yahoo finance. 

    Thank you Rafael for your friendly help.

    Hi in2it,

    Welcome to MSDN forums!

    You can retrieve Stock information from yahoo finance via Web Service. Please check the following two examples including code samples for detailed instruction:

    1. The Stock Sample Web Service
    http://www.reflectionit.nl/Stocks.aspx
    The Stock Sample Web Service uses the Html2Xml service to retrieve the Finance page of Yahoo. It then searches the Xml, using an XPath expression, for the current value and returns it. Hopefully Yahoo never changes their HTML structure.


    2. Building a Web Service to Provide Real-Time Stock Quote
    http://www.dotnetjunkies.ddj.com/Article/A3E8CA89-9AA1-4C3B-BCC6-901C92A523E9.dcik
    The Web Service returns real-time stock quotes. There are two functions. The first takes a string representing the stock ticker and returns a string representing the current price on the ECNs, which are electronic marketplaces for stocks. As will be described below, the prices are scraped from the Yahoo! Finance Web site. Please note that not all stocks are traded on ECNs, so some tickers will return "N/A". The second function takes a space-delimited string of tickers and returns a dataset of current prices. The information returned from these Web Services is freely available on the Internet.

    Best regards,
    Martin Xie

    Friday, January 23, 2009 5:44 AM

All replies

  • This is a good question. I am wondering that too, maybe adding a database would be useful in this case.
    Tuesday, January 20, 2009 5:51 AM
  • in2it said:

    I am trying to stock qoute program.  I pretty much have an idea of how to do it but my main question is how do i retreive the information from yahoo finance. 

    Thank you Rafael for your friendly help.

    Hi in2it,

    Welcome to MSDN forums!

    You can retrieve Stock information from yahoo finance via Web Service. Please check the following two examples including code samples for detailed instruction:

    1. The Stock Sample Web Service
    http://www.reflectionit.nl/Stocks.aspx
    The Stock Sample Web Service uses the Html2Xml service to retrieve the Finance page of Yahoo. It then searches the Xml, using an XPath expression, for the current value and returns it. Hopefully Yahoo never changes their HTML structure.


    2. Building a Web Service to Provide Real-Time Stock Quote
    http://www.dotnetjunkies.ddj.com/Article/A3E8CA89-9AA1-4C3B-BCC6-901C92A523E9.dcik
    The Web Service returns real-time stock quotes. There are two functions. The first takes a string representing the stock ticker and returns a string representing the current price on the ECNs, which are electronic marketplaces for stocks. As will be described below, the prices are scraped from the Yahoo! Finance Web site. Please note that not all stocks are traded on ECNs, so some tickers will return "N/A". The second function takes a space-delimited string of tickers and returns a dataset of current prices. The information returned from these Web Services is freely available on the Internet.

    Best regards,
    Martin Xie

    Friday, January 23, 2009 5:44 AM