SPEC: KapitaalBot Runtime
This page is the canonical public technical specification of KapitaalBot. It focuses on system behavior, operational architecture, and latency requirements. Source code, sensitive tuning values, and private account details remain intentionally out of scope.
1) Technology stack
| Component | Spec | Public note |
|---|---|---|
| Language | Rust | Core runtime and execution logic |
| Databases | PostgreSQL | Role-separated data paths (ingest / decision / research where applicable) |
| OS / Runtime | Linux (Ubuntu class) | Service-oriented runtime on dedicated host(s) |
| Process control | systemd services | Deterministic startup/restart and health supervision |
| Exchange integration | WebSocket-first | Live market + execution channels, snapshot/export driven website |
| Observability export | Read-model JSON snapshots | Public and tiered observability without direct DB exposure |
2) Runtime / architecture specs
KapitaalBot operates as a timing-aware multistrategy route-selection engine with live route-state, regime routing, position context, execution choke, and feedback-driven explainability.
spec.runtime.diagram.desc
3) Latency specification
The table below explicitly distinguishes latency targets, observed ranges, and delayed/background paths.
| Tier / Path | Target latency | Observed latency | Why it matters |
|---|---|---|---|
| Hot path (ranking → choke → submit) | Sub-second class | Runtime-dependent, monitored continuously | Direct impact on execution viability and stale-decision risk |
| Warm path (route-state refresh, explainability updates) | Seconds class | Low-seconds class under normal load | Controls decision freshness and interpretability |
| Tier 1 public observability | Delayed by design | Delayed snapshots | Prevents real-time strategy leakage while preserving transparency |
| Tier 2 analytical observability | Near-operational delay | Snapshot cadence dependent | Supports deep diagnostics without exposing account-sensitive internals |
| Tier 3/admin and private operator paths | Operationally immediate | Internal-only | Used for sensitive account/runtime control and forensic analysis |
4) Public safety boundary
- YES: functional behavior, architecture, high-level decision logic, outcomes, explainability.
- NO: source code, exact private thresholds, sensitive allocator/sizing details, account-specific data.