System architecture
Volrix runs a set of services on the owner’s machine. Each service owns a specific part of the trading session, with NATS carrying market data and commands between them.
Follow one candle
Stream
Normalizes broker ticks and publishes the closed minute over Core NATS.
Strategy
Runs the Python minute callback. A strategy can request a new leg here.
Legs
Tracks the position and sends an order intent through JetStream.
Engine
Applies the account limits, slices the order and sends it to the execution broker.
Services
| Service | Responsibility |
|---|---|
| Frontend | Setup, strategy editing, market data and account monitoring |
| Backend | Control API, configuration and database writes |
| Stream | Broker WebSocket connections, normalized ticks and closed minute candles |
| History | Download missing historical candles from broker accounts |
| Strategy | Load Python strategy classes and run their lifecycle hooks |
| Legs | Track entries, exits, stops, targets and fills by account |
| Engine | Route live orders, apply slicing and track broker responses |
| Scheduler | Coordinate daily jobs and the trading calendar |
Messaging
Core NATS distributes time-sensitive ticks and candles. JetStream carries durable commands and order events. This lets the execution engine process broker activity independently from website requests.
Storage
SQLite stores account, configuration, strategy and order records. DuckDB holds historical candles. The backend owns those database writes. Redis provides the hot cache for the current session’s candles, which the stream service updates as trades arrive.
See the architecture notes and leg handler in the application repository.