Add Frankfurter EUR/DKK rate polling and include rates in WebSocket stream

Polls self-hosted Frankfurter API hourly for USD-based EUR and DKK exchange
rates. Both the WebSocket HTML fragments and the /api/price/latest JSON
endpoint now include the currency rates alongside BTC price.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 14:22:24 +01:00
co-authored by Claude Opus 4.6
parent 39ec47b5e1
commit 7d6ca3911f
5 changed files with 113 additions and 22 deletions
+4 -2
View File
@@ -44,8 +44,8 @@ Docker runs alongside local dev on different ports and databases:
## API Endpoints
- `GET /api/health` — Health check
- `GET /api/price/ws` — WebSocket endpoint for live HTML price fragments (HTMX-compatible)
- `GET /api/price/latest` — Latest price as JSON
- `GET /api/price/ws` — WebSocket endpoint for live HTML price fragments with EUR/DKK rates (HTMX-compatible)
- `GET /api/price/latest` — Latest price + EUR/DKK rates as JSON
## Source Layout
@@ -55,6 +55,8 @@ src/clj/pmagnus/btcdata/
├── config.clj # System config loader
├── ws/
│ └── binance.clj # Binance WebSocket client
├── frankfurter/
│ └── rates.clj # EUR/DKK exchange rate poller
├── kraken/
│ ├── ohlc.clj # Hourly OHLC poller
│ └── ohlc_daily.clj # Daily OHLC poller