mirror of
https://github.com/prdlk/glance.git
synced 2026-08-02 17:31:40 +00:00
75 lines
3.7 KiB
YAML
75 lines
3.7 KiB
YAML
- type: split-column
|
|
max-columns: 5
|
|
widgets:
|
|
- type: custom-api
|
|
title: Secured Financing Rate
|
|
cache: 12h
|
|
url: https://api.stlouisfed.org/fred/series/observations?series_id=SOFR&api_key=46fd446049e6ad0cbd6e019584fe36bf&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 }}
|
|
<div class="flex justify-between items-center gap-15">
|
|
<div class="min-width-0">
|
|
<a class="size-h3 block color-highlight" href="https://fred.stlouisfed.org/series/MORTGAGE30US" target="_blank" rel="noreferrer">
|
|
{{ .JSON.String "observations.0.value" }}%
|
|
</a>
|
|
<div class="text-truncate">St. Louis Federal Reserve</div>
|
|
</div>
|
|
<div class="shrink-0">
|
|
<div class="size-h3 text-right {{ if lt $change 0.0 }}color-positive{{ else if gt $change 0.0 }}color-negative{{ end }}">
|
|
{{ printf "%+.2f" $change }}%
|
|
</div>
|
|
<div class="text-right" title="Last change: {{ $lastObserve }}" {{ $lastObserve | parseRelativeTime "DateOnly" }}>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
- type: custom-api
|
|
title: Federal Funds Rate
|
|
cache: 12h
|
|
url: https://api.stlouisfed.org/fred/series/observations?series_id=FEDFUNDS&api_key=46fd446049e6ad0cbd6e019584fe36bf&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 }}
|
|
<div class="flex justify-between items-center gap-15">
|
|
<div class="min-width-0">
|
|
<a class="size-h3 block color-highlight" href="https://fred.stlouisfed.org/series/MORTGAGE30US" target="_blank" rel="noreferrer">
|
|
{{ .JSON.String "observations.0.value" }}%
|
|
</a>
|
|
<div class="text-truncate">St. Louis Federal Reserve</div>
|
|
</div>
|
|
<div class="shrink-0">
|
|
<div class="size-h3 text-right {{ if lt $change 0.0 }}color-positive{{ else if gt $change 0.0 }}color-negative{{ end }}">
|
|
{{ printf "%+.2f" $change }}%
|
|
</div>
|
|
<div class="text-right" title="Last change: {{ $lastObserve }}" {{ $lastObserve | parseRelativeTime "DateOnly" }}>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
- type: custom-api
|
|
title: Real GDP
|
|
cache: 12h
|
|
url: https://api.stlouisfed.org/fred/series/observations?series_id=A191RL1Q225SBEA&api_key=46fd446049e6ad0cbd6e019584fe36bf&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 }}
|
|
<div class="flex justify-between items-center gap-15">
|
|
<div class="min-width-0">
|
|
<a class="size-h3 block color-highlight" href="https://fred.stlouisfed.org/series/MORTGAGE30US" target="_blank" rel="noreferrer">
|
|
{{ .JSON.String "observations.0.value" }}%
|
|
</a>
|
|
<div class="text-truncate">St. Louis Federal Reserve</div>
|
|
</div>
|
|
<div class="shrink-0">
|
|
<div class="size-h3 text-right {{ if lt $change 0.0 }}color-positive{{ else if gt $change 0.0 }}color-negative{{ end }}">
|
|
{{ printf "%+.2f" $change }}%
|
|
</div>
|
|
|