Returns rates for a given date: today uses latest DB row, past dates
check DB first then fetch from Frankfurter and persist for caching.
Future dates and invalid formats return 400.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Store daily exchange rates in PostgreSQL with EUR/DKK cross rate.
Seed rates atom from DB on startup so WebSocket works immediately
even if Frankfurter is unreachable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use POST /v1/currency-exchange-quotes to get actual buy price including
spread, matching the Strike app. Fee is cached daily to calculate the
pre-fee amount from the configured total (default 55 EUR). Store
quote_sats in the strike_price DB table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Price and Strike WebSockets now emit JSON instead of HTML fragments.
Added Strike WebSocket endpoint and wired strike/ticker into API routes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Poll Strike API every 10s, store all rates as JSONB in strike_price table
- Move Docker env vars to .env file, use shared network for cross-project communication
- Add startup retry (5x 5s) for Frankfurter poller to handle container race condition
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Split from btcprice monolith. Owns DB, migrations, Binance WebSocket,
Kraken OHLC pollers, and exposes a JSON API with SSE price stream.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>