Getting stock quotes

brikis98

Diamond Member
Jul 5, 2005
7,253
8
0
There are tons of websites you can browse to get a stock quote for any stock symbol you enter... but what are my options for doing this programmatically, especially with Java?
 

mundane

Diamond Member
Jun 7, 2002
5,603
8
81
Google Finance has an API, although I'm not sure you can use it outside of their 'gadgets'.

Previously, I've used Yahoo, fetched the web page, and parsed for the results. But that's a terribly inefficient way to grab bulk data, if that is your goal.
 

brikis98

Diamond Member
Jul 5, 2005
7,253
8
0
yeah, i saw the google finance thing, but it seems like it might be limited. Parsing web pages wouldn't be too tough, but if they change their styling (which happens frequently enough) your code would fail.

any other ideas?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
http://www.opentick.com

Free streaming real time data for NON-professional traders, and free historical data for anyone. Their API is pretty solid for .NET, the only one I've used. Their dividend data needs a bit of work, I was only able to get around a 50% accuracy rate from it, but their tick data seems very solid. Their server speeds are pretty fast too, just download historical data after market hours.
 

hans007

Lifer
Feb 1, 2000
20,212
18
81
you basically have to screen scrap sites.

the places that provide real time quotes actually charge a lot of money depending on what you are tryign to use the data for (say you were starting a hedge fund and wanted to do a lot of analysis on stock data...etc)
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: hans007
you basically have to screen scrap sites.

the places that provide real time quotes actually charge a lot of money depending on what you are tryign to use the data for (say you were starting a hedge fund and wanted to do a lot of analysis on stock data...etc)

Only if you are a licensed professional trader. If you are a starting a hedge fund, paying the exchange fees is chump change.
 

ahurtt

Diamond Member
Feb 1, 2001
4,283
0
0
This is a perfect candidate for a Web Service implementation if you ask me. I'm sure there must be multiple places out there where they offer web services for stock quotes.

If you aren't familiar with web services, here's the link to the Web Services Reference at Sun for Java web services.

http://java.sun.com/webservice...ce/apis-docs/index.jsp

Basically the publisher (provider) of the web service provides an XML file called a WSDL (Web Service Description Language) file that describes the usage of the web service to clients. You donwnload the WSDL file and you can either write the client implementation yourself or have an IDE generate one for you based off the WSDL file. Bam, you're in business.
 

brikis98

Diamond Member
Jul 5, 2005
7,253
8
0
Originally posted by: ahurtt
This is a perfect candidate for a Web Service implementation if you ask me. I'm sure there must be multiple places out there where they offer web services for stock quotes.

If you aren't familiar with web services, here's the link to the Web Services Reference at Sun for Java web services.

http://java.sun.com/webservice...ce/apis-docs/index.jsp

Basically the publisher (provider) of the web service provides an XML file called a WSDL (Web Service Description Language) file that describes the usage of the web service to clients. You donwnload the WSDL file and you can either write the client implementation yourself or have an IDE generate one for you based off the WSDL file. Bam, you're in business.

indeed, you may be right... from a brief google search, i found:

WebserviceX.NET
SwanandMokashi

haven't tried them yet, but it looks like they might do the trick. i'm sure there are others too.