Denormalized read table with id, event_id, occurred_at, wallet, sats,
fee_sats, and amount_eur. Projected on event creation and rebuildable
via POST /api/buys/rebuild. Fiat amounts converted to EUR using
Frankfurter rates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1-minute OHLC candles from Kraken, polled every 15 seconds to keep the
in-progress candle fresh. Unlike hourly/daily pollers, this one keeps
the last candle and upserts it as it updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Exchanges (can receive bank deposits) vs wallets (cold storage only).
Supports ?type= filter on GET /api/wallets.
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>
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>
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>
- 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>
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>