perleager has asked for the wisdom of the Perl Monks concerning the following question:

Hello Everyone,

I'm looking to put a stock quote chart on my website, such as the one on schwab.com (There chart is provided by BigCharts.com).

I've searched for around a hour or so for free website content that would provide such charts like that, but haven't found any but one which is Stocks.com. They provide a chart similar but has that big Stocks logo which I really don't want.

Then I came to this site and searched for Stock Quotes and eventually found out about the Finance::YahooChart module. Has anyone used this? Is it illegal in anyway since the module retrieves the chart data from Yahoo? Also for anyone who has used this, is this the right module I'm looking for? I've went to the modules website but can't seem to find any working chart examples using the module.

Thanks,
Anthony

janitored by ybiC: Retitle from misspelt "Finanace::YahooChart"

Replies are listed 'Best First'.
Re: Finance::YahooChart legal opinions?
by allolex (Curate) on Jan 31, 2004 at 10:33 UTC

    It's not criminal to download publically-available information from a site, but it may be against the terms of service of that service provider (Yahoo, in this case). Depending on how you do it, it may also be inconsiderate. If you are retrieving information from a site, remember to take steps to reduce server load.

    For a concrete answer, have a look at the Yahoo Terms of Service. Good luck!

    --
    Allolex

Re: Finance::YahooChart legal opinions?
by JamesNC (Chaplain) on Jan 31, 2004 at 19:09 UTC
    The modules are super easy to use:
    (Win32 AS 5.8)
    Get some charts
    use Finance::YahooChart; foreach( @ARGV ){ last unless /\w+/; my %img = getchart(symbol => $_ , size => 'b', type => 'w', include => 'm'); `get $img{'url'} > $_.jpg`; }

    Get some quotes
    #!/perl/bin/perl use strict; use Finance::YahooQuote; my @quote = getquote @ARGV; foreach (@quote){ print "${$_}[1] Bid: ${$_}[9] Ask: ${$_}[10] Last: ${$_}[2] \n"; }

    Example usage:
    c:\>quote.pl ibm msft qqq
    Update:removed the results

    I can't speak to the legal issues and think it is OT for this group. Martha Stewart's site probably has a lot of knowledge about stuff like that though, you might check her site out for that topic: www.marthstewart.com (kidding of course )
    You should ask a lawyer about this stuff (Not kidding), especially since the SEC is very particular about dissemination of information about publicly traded securities.
    Someone makes a poor investment decision based on information you provied and you my friend are now possibly liable for losses they incurred. Are you sure you are ready for that?
    Cheers,
    JamesNC
Re: Finance::YahooChart legal opinions?
by blue_cowdawg (Monsignor) on Feb 02, 2004 at 21:18 UTC

    Any time you republish information without specific permission you are opening yourself to trouble. Oh by the way the information being downloaded is actually the property of the NYSE, NASDAC or whatever exchange it originated from and is being republished by Yahoo as a result of a licensing agreement they have with the respective exchanges or whatever provider is providing them with the market feeds.

    But then, I'm not a lawyer, don't play one on TV and all of the legal knowledge I have is the result of watching way too many episodes of Law & Order. I would consider the following:

    1. Consult an attorney before publishing the results of your derived work publicly
    2. or don't make it publicly accessable. If you are using it for your own use I can't forsee you getting in trouble for it. OTOH see #1 above.
    Once again, I am not an attorney so my legal advice is worth every penny you have paid for it.


    Peter L. Berghold -- Unix Professional
    Peter at Berghold dot Net
       Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.
Re: Finance::YahooChart legal opinions?
by mojotoad (Monsignor) on Feb 03, 2004 at 17:44 UTC
    All this tip-toeing around in todays litigious society is going a little overboard. I mean honestly -- oooh, don't repeat INFORMATION...someone might USE that information and SUE you (queue spooky music and hand waving). I've got news for you -- anyone can sue you for anything at any time. Whether they prevail in court or not is another matter entirely.

    Non-realtime stock quote information (usually 15 min delay or so) is public information -- you can do anything you want with it. These actual figures are like data from an almanac.

    A particular chart, on the otherhand, is subject to copyright. Yahoo! is usually pretty liberal with their usage polices -- check their terms of service. Just use common sense. If it's for more or less personal use, I wouldn't spend too much time worrying about it. If you're republishing charts, that's quite likely another story.

    If you're that concerned, get the raw quote data and generate your own charts using one of the various graphing or charting modules on CPAN.

    Matt

Re: Finance::YahooChart legal opinions?
by BbTrumpet (Acolyte) on Feb 02, 2004 at 21:02 UTC

    Not that I am a big fan of lawyers, but if you really want to cover your behind, I would recommend consulting with one rather than depending on the advice of Perl users. Legal matters tend to be about as complex as programming matters, and require a similar level of expertise and attention to detail if you want to avoid mistakes. (Also, any non-lawyer here who passes along incorrect legal advice could possibly open him/herself up to legal trouble.)

    Disclaimer: I am not a lawyer, so please consult with your lawyer before assuming any of my preceding statements are correct. B^)