Question

The yahoo finance api YQL query is great for getting stock data, but it returns so many things, most of which I am not interested in.

A basic query like,

select * from yahoo.finance.quotes where symbol = 'GOOG'

returns every parameter available, some of which are empty.

All that I want is 'symbol', 'name', 'volume', and 'ask'. So how do I restrict the results to just this data?

I've tried:

select * from yahoo.finance.quotes where symbol = 'GOOG' and columns = 'Symbol,Name,Volume,Ask'

But the results are null.

Was it helpful?

Solution

Try the following query:

select Symbol,Name,Volume,Ask from yahoo.finance.quotes where symbol = 'GOOG'

Rest call: http://tinyurl.com/kmwn5ke

EDIT
YQL documentation for syntax of SELECT in YQL here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top