theericstone⚡️ LQ / FRED LiveQuery Function Guide copy
    Updated 2024-02-07
    -- forked from flipsidecrypto / ⚡️ LQ / FRED LiveQuery Function Guide @ https://flipsidecrypto.xyz/flipsidecrypto/q/HfdC_fuHqqUk/lq-fred-livequery-function-guide

    -- FRED 🤝 Flipside LiveQuery Function Guide
    -------------------------------------------------------------------------
    -- The FRED LiveQuery integration enables you to retrieve economic data
    -- from the FRED websites hosted by the Economic Research Division
    -- of the Federal Reserve Bank of St. Louis.

    -- -----------------------------------------------------------------
    -- 🚨 WARNING 🚨
    -- To run these examples you must associate your FRED API Key
    -- with your Flipside Account here:
    -- <link to fred marketplace listing>

    -- ======================================================================
    --
    -- ⚡️ FRED Functions
    -- schema: `fred`
    -- function docs: https://fred.stlouisfed.org/docs/api/fred/#API
    --
    -- ======================================================================

    --
    -- #️⃣ fred.graphql
    -- (https://fred.stlouisfed.org/docs/api/fred/series.html)
    --
    with raw as (SELECT
    fred.get_series({
    'series_id': 'FEDFUNDS',
    'file_type': 'json',
    'observation_start': '2023-02-14'
    }) as resp
    )
    select
    value:date::date as date,
    value:value as value
    Last run: about 1 year ago
    DATE
    VALUE
    1
    2023-02-01 00:00:00.000
    4.57
    2
    2023-03-01 00:00:00.000
    4.65
    3
    2023-04-01 00:00:00.000
    4.83
    4
    2023-05-01 00:00:00.000
    5.06
    5
    2023-06-01 00:00:00.000
    5.08
    6
    2023-07-01 00:00:00.000
    5.12
    7
    2023-08-01 00:00:00.000
    5.33
    8
    2023-09-01 00:00:00.000
    5.33
    9
    2023-10-01 00:00:00.000
    5.33
    10
    2023-11-01 00:00:00.000
    5.33
    11
    2023-12-01 00:00:00.000
    5.33
    12
    2024-01-01 00:00:00.000
    5.33
    12
    421B
    3s