Query editor
-- This is a plot of the Fear & Greed Index over time, where a value of 0 means "Extreme Fear" while a value of 100 represents "Extreme Greed".with raw_api as (select json_parse(http_get('https://api.alternative.me/fng/?limit=0')) as json_data),unnested as (select cast(item as json) as fng_datafrom raw_api, unnest(cast(json_extract(json_data, '$.data') as array(json))) as t(item)),formatted as (selectfrom_unixtime(cast(json_extract(fng_data, '$.timestamp') as bigint)) as time,cast(json_extract(fng_data, '$.value') as int) as fear_and_greed_value,json_extract(fng_data, '$.value_classification') as classificationfrom unnested)select *from formattedorder by time desc--limit 100