Skip to content

Instantly share code, notes, and snippets.

@TimFletcher
Last active August 29, 2015 13:57
Show Gist options
  • Save TimFletcher/9349553 to your computer and use it in GitHub Desktop.
Save TimFletcher/9349553 to your computer and use it in GitHub Desktop.
require 'yql_finance'
query = YQLFinance::StockQuery.new
response = query.find_by_symbol('P')
results = JSON.parse(response.body)
# To see a nice representation of the hash
pp(results)
# To get LastTradePriceOnly
results['query']['results']['quote']['LastTradePriceOnly']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment