Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing stock quotes

 
michael bradly
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea where to put this post...
I'm interested in accessing stock quotes directly and parsing out the information into a database and have no idea where to begin my reasearch. I have no idea if direct access is even feasable without some sort of fee.
Any leads would be appreciated.
Michael
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by michael bradly:
I have no idea if direct access is even feasable without some sort of fee.

If you haven't noticed, the only people sure to make money in the market are those who control the information about it. Direct access costs big money. You could probably use a free stock website like Yahoo, and parse the info out of the HTML, but a) it wouldn't scale well for more than a couple of stocks and b) the people who provide that information would probably have an issue with you using it for anything more than an acedemic case study.
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm interested in accessing stock quotes directly and parsing out the information into a database and have no idea where to begin my reasearch. I have no idea if direct access is even feasable without some sort of fee.
Not sure what you are planning to do or what you mean by "direct access", but it's fairly straightforward to write a Java program that will post an HTTP request to a particular web site and parse the response. It's just a few dozen lines of code.
If you are planning to do something more professional, like programmatically keeping track of hundreds of stocks in real time, buiding portfolio, placing orders, monitoring execution, and managing risk, you may want to look at Interactive Brokers. Essentially, they are a brokerage house that gives you a trading API (in a jar file), and you can write your own program against that API to do whatever you want.
[ November 25, 2003: Message edited by: Eugene Kononov ]
 
michael bradly
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool, thanks. I thought about the html parser as well but was curious what the process of accessing something like level 2 quotes directly might be.
Joe, I'm wondering why it would not be scalable for more then a few stocks though?
Thanks, Michael
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by michael bradly:
Joe, I'm wondering why it would not be scalable for more then a few stocks though?

I think the owner of the data might notice if they are getting a hundred simultaneous hits from the same IP and come looking for you. If you are planning on using this for anything but an academic example, I'd follow Eugene's lead. It would suck to put a bunch of work into a parser only to have the host block your IP. Or file a lawsuit.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that creating an app to parse a web page (also referred to as scraping) is often not the appropriate avenue down which to venture. Web pages are written for people as the clients, not for applications. As such, a web page design could easily change, invalidating any parsing clients, but still allowing the intended human audience to use the page.
Web Services are just the technology designed to define a strategy for an application to be the client (user) of another application. I wouldn't be surprised if a free web service or two is available for querying stock information.
I'm moving this thread to the Web Services forum...
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!