AegisAEGIS
Introduction

Architecture

How the Aegis services fit together — Dashboard, Trading Core, Quant Engine, and Training Pipeline over gRPC and NATS JetStream.

The services

Aegis is built from a small set of focused services that communicate over gRPC and NATS JetStream. The design is event-driven, and a transactional outbox guarantees that state changes and the events they emit stay consistent.

Dashboard (Next.js / React)

The user-facing surface. It handles wallet-first sign-in, strategy configuration, risk settings, backtesting UI, and monitoring. It talks only to the Trading Core — it never reaches an exchange directly.

Trading Core (Go)

The heart of the platform, written in Go (Fiber, PostgreSQL, NATS JetStream, Redis). It owns:

  • Market data — Binance WebSocket + REST feeds.
  • Signals — orchestration of strategy output into actionable intent.
  • Deterministic risk — per-symbol and portfolio limits, atomic reservations, and the kill switch.
  • Execution — placing MARKET, LIMIT, STOP_MARKET, and STOP_LIMIT orders.
  • Identity — SIWE authentication, multi-wallet links, passkeys, and step-up.

The Trading Core is the only service that touches exchanges. It also enforces multi-tenant isolation with PostgreSQL Row-Level Security and records everything in a double-entry ledger and immutable audit trail.

Quant Engine (Rust)

A dedicated compute service (gRPC, ONNX runtime) that does the heavy math: the 10 indicators (ADX, ATR, Bollinger Bands, EMA, MACD, Momentum, RSI, SMA, Volume, VWAP), the 5 strategies, backtests with streaming (SSE) progress and parameter optimization, and ONNX model inference. Indicators are computed here — never in the browser.

Training Pipeline (Python)

An offline pipeline (LightGBM / XGBoost) that trains models and exports them to ONNX for the Quant Engine to run. On-chart and live inference is in development and not yet wired to live signals.

Data flow

Dashboard → Trading Core → Quant Engine, with the Training Pipeline feeding ONNX models into the Quant Engine. Because only the Trading Core connects to exchanges, the security boundary is easy to reason about — see The Non-Custodial Model.

On this page