Question:

What are the available characters in a url to get specific fields from yahoo! finance via a php page?

by Guest34199  |  earlier

0 LIKES UnLike

I want to be able to create a web page that allows a user to select fields, then create a quote from yahoo! finance using the fields the user selected. What are the field/keyword values that are available.

Please give me another useless answer like "it should be listed under help", or "look on the developer page".

 Tags:

   Report

1 ANSWERS


  1. Hi,

    Here's one approach that might work. I don't know if you already know about Finance Badges. They're documented at:

    http://finance.yahoo.com/badges

    These require IFRAME. That requirement is documented at:

    http://help.yahoo.com/help/us/fin/badges...

    If you don't have IFRAME support, this is probably a deadend. If you do, you can use the Finance Badge Wizard to generate static HTML code like this:

    <!-- Start of Yahoo! Finance code -->

    <iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://api.finance.yahoo.com/instru... width="200px" height="338px"></iframe>

    <!-- End of Yahoo! Finance code -->

    This asks for quotes for Oracle (ORCL) and Pfizer (PFE). I supposed you could let your user select other stocks (up to 10), and substitute their ticker symbols where "ORCL,PFE" occurs in the above code.

    (It turns out the link in the above text is live. If you click on it, you get a page with the quotes for ORCL & PFE.)

    The tricky part is getting the code to "execute" with the new values your user chose. I wouldn't know how to do that.

    There may be other Yahoo Finance APIs that I don't know about.  Have you looked at Yahoo Widgets? They're at:

    http://widgets.yahoo.com/

    You don't want a widget, because a widget runs on the client side. But there are some stock quote widgets that retrieve data from Yahoo. You might be able to use whatever API they use.

    Hope one or the other of these helps.

    Added note: besides the technical problem, there's a legal aspect to this question. Basically Yahoo doesn't allow you to just retrieve data from their web site and display it at yours, without giving them any credit. That's one reason the Finance Badges, which do appear at your web site, say "Yahoo Finance" at the top and have a link to Copyright info at the bottom. I think the Finance Badges are the only Yahoo-approved way of displaying quotes from Yahoo at your web site.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.