Get financial option data using YQL

I use YQL to get the financial option data. Sort of:

select * from yahoo.finance.options where symbol="AAPL" and expiration="2011-07" 

However, the above query returns optionsChain data.

Is there a way to get only an entry for a specific option character, for example. symbol=AAPL110716C00155000 ?

Thank you for your time.

+6
source share
2 answers

You can apply a "local filter" to your desired character in the result set returned from yahoo.finance.options in addition to the "deleted filters" ( symbol and expiration ).

 select option from yahoo.finance.options where symbol = "AAPL" and expiration = "2011-07" and option.symbol = "AAPL110716C00155000" 

( Try this query in the YQL console. )

For more information about results filtering results, see the Filtering Query Results (WHERE) page in the YQL documentation.

+5
source

I just got all options

 select * from yahoo.finance.options where symbol="A" and expiration="2012-10" 

And then just used JSON Parser to parse the optionsChain data and got my data right.

0
source

Source: https://habr.com/ru/post/891134/


All Articles