Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting real-time market/stock quotes in C#/Java

Tags:

java

c#

stocks

I would like to make an program that acts like a big filter for stocks. To do so, I need to have real-time (or delayed) quotes from the market. I started getting stock quotes by requesting pages from yahoo, accordingand parsing the html to the ticker, and parsing the html. I was wondering how to do this requesting and parsing html. Is there some way I can request only the stock quotes and its info? I know some applications do this, and I am very curious how they do it, because requesting web pages and parsing them is very time-consuming.

Thanks, Dave

like image 316
David Menard Avatar asked Dec 29 '09 15:12

David Menard


People also ask

How do I get real-time stock quotes?

You can access Real-Time Quotes from anywhere on the Fidelity.com website. Quotes are available for stocks, mutual funds, Fidelity Select Portfolios ®, indexes, options, bonds, and annuities. Just enter the stock's symbol in the search field or you can look up stocks by company name.

Is there an API for the stock market?

The Investing API (provided by APIDojo) allows developers to access stock data for cryptocurrencies and markets. This API is ideal for tracking price changes and exchange rates.

Why are there 20 minute delays on stock quotes?

Many financial networks, websites, and apps provide delayed quotes, which show where a stock or currency stood 15 or 20 minutes ago. Delayed quotes are usually enough information for a casual investor who isn't looking to time the market.


2 Answers

Parsing the output of the webpage is a chump's game. It is always changing and unless you're willing to heavily invest in some sort of very resilient parser you're going to spend your life twiddling with it. Use a web service, google offers one http://googleblog.blogspot.com/2007/01/real-time-quotes-for-free.html

like image 66
stimms Avatar answered Sep 25 '22 09:09

stimms


You can get csv data from yahoo.

This page has more information.

like image 26
Mongus Pong Avatar answered Sep 21 '22 09:09

Mongus Pong