chickadee » yahoo-finance » fetch-quotes

fetch-quotes symbol-or-symbols field-or-fieldsprocedure

fetch-quotes takes one or more stock symbols and one or more field name symbols and returns a table of the requested information:

   > (use yahoo-finance)
   
   > (fetch-quotes 'aapl 'eps)
   ((stock (eps 42.548)))
   
   > (fetch-quotes 'aapl '(name p/e p/s p/b))
   ((stock (name "Apple Inc.")
           (p/e 15.86)
           (p/s 4.25)
           (p/b 5.66)))
   
   > (fetch-quotes '(aapl goog msft) '(name high low change)))
   ((stock (name "Apple Inc.")
           (high 677.67)
           (low 672.6)
           (change -1.334))
    (stock (name "Google Inc.")
           (high 688.99)
           (low 676.15)
           (change 10.76))
    (stock (name "Microsoft Corpora")
           (high 30.75)
           (low 30.44)
           (change 0.02)))

Read the code for a list of available fields.