0

Querying the financial data

Hi there,
I've looked around a bit and re-read the Ajaxian thread where I found out about YQL but I can't seem to find any information on how to query Yahoo finance. Any help greatly appreciated
Paul

by
2 Replies
  • QUOTE (hanlon.paul@... @ Jan 9 2009, 01:10 PM) <{POST_SNAPBACK}>
    Hi there,
    I've looked around a bit and re-read the Ajaxian thread where I found out about YQL but I can't seem to find any information on how to query Yahoo finance. Any help greatly appreciated
    Paul


    Hi Paul,

    There is a sample to get the headlines from the yahoo finance data (can be found in the example queries section)

    CODE
    select * from html where url="http://finance.yahoo.com/q?s=yhoo" and xpath='//div[@id="yfi_headlines"]/div[2]/ul/li/a'


    Alternatively you can also directly query the csv file returned by yahoo finance (or any other website)


    CODE
    select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=YHOO&f=sl1d1t1c1ohgv&e=.csv'


    -- Nagesh
    0
  • Many thanks, Nagesh,
    I did have a look at the API, and deduced that it would be a html query. Didn't know about the csv queries and missed the example.
    Paul.
    0

Recent Posts

in YQL