Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

SOAP finance requests?

Thread view: 
Robert M. Gary - 11 Nov 2005 03:00 GMT
I'm trying to get historic stock returns for a web-app I want to put
together. Does anyone know of a source of such data? I see some SOAP
sites that offer quotes but I need the previous 30 months of returns to
generate my graphs.
Thanks!
-Robert
Joan - 11 Nov 2005 05:13 GMT
I get mine from "finance.yahoo.com"

> I'm trying to get historic stock returns for a web-app I want
> to put
[quoted text clipped - 5 lines]
> Thanks!
> -Robert
Robert M. Gary - 11 Nov 2005 05:16 GMT
What is the SOAP protocol for that? I want to allow people to enter a
list of stocks and then produce financial models for them.
Joan - 11 Nov 2005 17:53 GMT
> What is the SOAP protocol for that? I want to allow people to
> enter a
> list of stocks and then produce financial models for them.

Don't know about soap, your original request was:

"I'm trying to get historic stock returns for a web-app I want to
put
together. Does anyone know of a source of such data?"
Robert M. Gary - 11 Nov 2005 19:32 GMT
Ok, forget the SOAP. How does your web-app retrieve the data from
finance.yahoo.com?
-Robert
Joan - 12 Nov 2005 02:29 GMT
> Ok, forget the SOAP. How does your web-app retrieve the data from
> finance.yahoo.com?
> -Robert

In a nutshell you generate a url
For testing you can paste the url into your browser

// coTick is the ticker symbol like "IBM"
// a=month, b=day, c=year of the older date
// d=month, e=day, e=year of the newer date
  u = "http://ichart.finance.yahoo.com/table.csv?s=" + coTick + "&a=" + ya + "&b="
               + yb + "&c=" + yc + "&d=" + yd + "&e=" + ye + "&f=" + yf + "&g=" + yg;

  try {
       url = new URL(u);
// then you download the url
Robert M. Gary - 12 Nov 2005 17:28 GMT
Cool. That should work. I'll get back an html that I can use to scrape
out the data and apply the numbers to my formulas.

-Robert
Joan - 12 Nov 2005 20:08 GMT
> Cool. That should work. I'll get back an html that I can use to
> scrape
> out the data and apply the numbers to my formulas.
>
> -Robert

Even better, you get a text file in the csv format so you can use
split
on each line to get the data.
Robert M. Gary - 13 Nov 2005 03:42 GMT
Awesome! That's great to know!
Robert M. Gary - 13 Nov 2005 03:46 GMT
BTW: How do you come across this type of information? I didn't see
anything advertised by yahoo about this? Is there a directory of these
types of resources? Is there a limited number of queries that can come
from an IP? Should I use an applet to keep it from looking like all the
requests are coming from my web page :) ?
Joan - 13 Nov 2005 23:26 GMT
> BTW: How do you come across this type of information? I didn't
> see
[quoted text clipped - 5 lines]
> all the
> requests are coming from my web page :) ?

I found it accidently on someone's blog - forgot where.

I think you can request as often as you like, but have not tested
it.
Roedy Green - 14 Nov 2005 01:42 GMT
>Even better, you get a text file in the csv format so you can use
>split
>on each line to get the data.
or use a CSVReader. See http://mindprod.com/jgloss/csv.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.