Kraken-only crypto trading workspace. Real-time microstructure ingestion + ML-driven discretionary signals on USD pairs (~610 active coins). US/TX jurisdiction (USD-quoted only, no XMR, no on-chain staking).
| process | role |
|---|---|
| dashboard | Static HTTP server (/signals.html, /positions.html, POST /buy). Runs the positions monitor that polls Kraken balance every 60s and renders HOLD/SELL verdicts on held coins. |
| ingester | WS subscriber for ~630 USD pairs. Aggregates trade + book channels into 5-min buckets across 4 tables (stats_price_5m, stats_volume_5m, stats_trades_5m, stats_quotes_5m). Runs derivations.py after each flush, then trains/scores the BUY and SELL signal models. Gated by INGESTER_ENABLED. |
Two XGBoost classifiers trained on all populated cross-coin-comparable derived columns from the 4 microstructure tables (raw price levels are dropped — they encode per-coin identity and overfit OOS).
| model | target | horizon |
|---|---|---|
| BUY | max(high[t+1..t+12]) / close[t] - 1 >= +10% |
next 1 hour |
| SELL | min(low[t+1..t+6]) / close[t] - 1 <= -3% |
next 30 minutes |
Retrained every hour, scored every 5-min cycle. Top-5 BUY picks render to
signals.html; held-coin SELL scores power positions.html verdicts.
Buy button on signals.html → POST /buy → spawns the patience-walk executor:
T=0s post-only limit @ ref * 0.997 (−0.30%)
every 30s amend toward ref * 1.006 (+0.60%) in 7 steps over 3 min
hold at top for 2 min
cancel if not filled
Single Azure Container App, min=1/max=1 replica in centralus. Image built from
Dockerfile, published to GHCR by .github/workflows/deploy.yml. /app/data
backed by an Azure File share so DuckDB, models, and HTML survive revisions.
python3 scripts/ws_ingester.py # WS ingester + derivations + scoring
python3 scripts/dashboard_server.py # HTTP server + positions monitorSee CLAUDE.md for jurisdiction rules, schema, and conventions.