Add POST /api/deposits/rebuild to re-project all bank_to_exchange events.
Fix date-off-by-one by converting java.sql.Date to LocalDate via
ReadableColumn and serializing with Jackson JavaTimeModule.
Sort all event/deposit queries by occurred_at, id.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Project each bank_to_exchange event into a denormalized deposits table
with pre-computed EUR, DKK, and USD amounts using Frankfurter currency
rates. Replaces the aggregate get-deposit-totals query.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GET /api/deposits/totals returns fiat deposited per exchange per currency
from bank_to_exchange events, aggregated via SQL.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wallets table with 7 seeded wallets, events table for three transaction
types (bank_to_exchange, exchange_to_wallet, wallet_to_wallet). Balances
computed from event credits/debits in sats. REST endpoints for CRUD.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
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>
- Require frankfurter.rates namespace in core.clj so Integrant can find it
- Use /v1/ prefix for self-hosted Frankfurter API
- Display BTC price converted to EUR and DKK instead of raw exchange rates
- Remove unused host port mapping for Frankfurter container
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>
- WebSocket sends HTML fragments with id="price-display" instead of JSON
for direct HTMX OOB swap on the client
- Switch from ring-undertow-adapter ws wrapper to raw Undertow WebSocket
API (proxy) to fix single-connection limitation
- Keep JSON endpoint at /api/price/latest unchanged
- Update CLAUDE.md and README.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace SSE endpoint (/api/price/stream) with WebSocket (/api/price/ws)
using ring-undertow-adapter's built-in WebSocket support
- Change Docker internal port from 4100 to 4101 to avoid conflicts with
local dev (make run still uses 4100)
- Add free-port.sh utility script
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Undertow dispatch for SSE handler to avoid Ring adapter conflict.
Add docker-compose.yml (port 4101 to coexist with local dev on 4100).
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>