# Macro rates box (St. Louis Fed / FRED).
# ponytail: an $include'd file must be a bare YAML sequence, so no shared anchor
# here — the three widgets repeat a static template. Don't add a `define:` key.
- type: custom-api
title: Secured Financing Rate
cache: 12h
url: https://api.stlouisfed.org/fred/series/observations?series_id=SOFR&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2
template: |
{{ $latest := .JSON.Float "observations.0.value" }}
{{ $previous := .JSON.Float "observations.1.value" }}
{{ $lastObserve := .JSON.String "observations.0.date" }}
{{ $change := sub $latest $previous }}
{{ printf "%+.2f" $change }}%
- type: custom-api
title: Federal Funds Rate
cache: 12h
url: https://api.stlouisfed.org/fred/series/observations?series_id=FEDFUNDS&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2
template: |
{{ $latest := .JSON.Float "observations.0.value" }}
{{ $previous := .JSON.Float "observations.1.value" }}
{{ $lastObserve := .JSON.String "observations.0.date" }}
{{ $change := sub $latest $previous }}
{{ printf "%+.2f" $change }}%
- type: custom-api
title: Real GDP
cache: 12h
url: https://api.stlouisfed.org/fred/series/observations?series_id=A191RL1Q225SBEA&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2
template: |
{{ $latest := .JSON.Float "observations.0.value" }}
{{ $previous := .JSON.Float "observations.1.value" }}
{{ $lastObserve := .JSON.String "observations.0.date" }}
{{ $change := sub $latest $previous }}
{{ printf "%+.2f" $change }}%