Skip to content

NautilusTrader Real-Time Server

A real-time trading infrastructure combining a FastAPI dashboard, NautilusTrader engine, and a log-based observability stack for measuring per-strategy trading latency.

Overview

Five instrumented strategies emit structured JSON metrics via the Nautilus logger; Grafana Alloy tails the log file, converts metrics to Prometheus, and pushes them to Mimir for Grafana dashboards.

Quick Start

# 1. Install prerequisites
brew install just uv   # macOS

# 2. Start dev environment
just setup

# 3. Seed initial data
just seed

# 4. Run the dashboard
just dashboard

Open the API at http://localhost:8000 and docs at http://localhost:8000/docs.

Key Components

Component Role
engine/ NautilusTrader node — 5 strategies + DatabaseActor
dashboard/ FastAPI REST API — trading data & dashboard endpoints
infra/alloy/ Alloy pipeline: tail JSON logs → emit Prometheus metrics
infra/grafana/ Auto-provisioned Mimir datasource and latency dashboard
db/ SQLModel models + Alembic migrations