David Menard
David Menard

Reputation: 2321

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

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

Upvotes: 27

Views: 93041

Answers (11)

J. Peterson
J. Peterson

Reputation: 2033

The Google and Yahoo API's have both gone away. However, Investor's Exchange offers an API that's very easy to use for quote data.

Upvotes: 4

Montana
Montana

Reputation: 1

Using Fidelity.com & inspecting the element for the selling price you can manipulate the URL to search any stock from inside your program.

Using Visual Studio Community 2013 C#

Upvotes: 0

Ta01
Ta01

Reputation: 31630

Afaik, this kind of data is available via subscription based models, Xignite is one that comes to mind. To my knowledge, NASDAQ and the NYSE do not provide any freely usable API's.

Upvotes: 3

Atom
Atom

Reputation: 1

Here is a list of websites that provide free intraday data.

You can export the data and use it in your software

Upvotes: 0

Umang Bhatt
Umang Bhatt

Reputation: 21

this internally uses yahoo stock api. i hope this one helps you out.

https://github.com/bhattumang7/gold-silver-share-price-api-india

Upvotes: 1

Maas
Maas

Reputation: 11

For downloading yahoo finance stock quotes in C# or VB.NET you can use the "Yahoo! Finance Managed" library.

Click here

Upvotes: 1

Moberg
Moberg

Reputation: 793

Try to look at this channel9 presentation. It is a F# introduction but from 27:00 the presenter, Luca Bolognesi, creates an application that does some of the work you are asking for (in F# but very inspirational - to me at least).

Upvotes: 0

John Channing
John Channing

Reputation: 6591

In the financial services industry, most banks will have a real time feed provided by Reuters or Bloomberg, but this, obviously, will cost a lot of money. If you Google for "stock price feed" or "market data feed" you will get some options, some free, some paid for.

I would also recommend using a Complex Event Processing engine such as Esper for doing this sort of real time processing, it will be substantially easier than writing the whole application stack from scratch.

Upvotes: 1

stimms
stimms

Reputation: 44094

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

Upvotes: 29

Aye
Aye

Reputation: 393

There is actually a yahoo web service that will return CSV file of stock quotes. So no HTML parsing needed

Upvotes: 1

Mongus Pong
Mongus Pong

Reputation: 11477

You can get csv data from yahoo.

This page has more information.

Upvotes: 10

Related Questions