Skip to content

Reference

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.

Volrix Trade architecture. The scheduler, UI and backend sit on top, with the backend as the only writer to SQLite, DuckDB and Parquet. NATS carries md.tick, md.minute, md.greeks, jobs and orders between services, and Redis is the hot cache. Market data services stream, greeks and history, and trading services strategy, legs and engine, all talk over NATS. Stream reads broker WebSockets, history uses broker REST APIs, and the engine sends orders to the brokers. MARKET DATATRADINGschedulercron → jobs.*UINext.jsbackendsole DB writerFastAPI · MCP · auth · accountsSQLitecontrolDuckDBhistoryParquetsymbolsNATScore + JetStreammd.tick · md.minute · md.greeks · jobs.* · orders.*Redishot cachestreamWebSockets →ticks, 1m candlesmd.tickgreeksIV, Δ Γ Θ νevery option barmd.greekshistory1m backfill→ DuckDBjobs.historystrategy1 process eachminute looplegs.rpclegsSL · target · trailchecked every tickorders.cmdengineslicing, rate limitsreconciliationorders.eventBroker APIsKite · FYERS · Angel One · 5paisa · Upstox · Kotak · Nubra · Arrow · Pocketful · DeltaWebSocketRESTorders Volrix Trade architecture. The scheduler, UI and backend sit on top, with the backend as the only writer to SQLite, DuckDB and Parquet. NATS carries md.tick, md.minute, md.greeks, jobs and orders between services, and Redis is the hot cache. Market data services stream, greeks and history, and trading services strategy, legs and engine, all talk over NATS. Stream reads broker WebSockets, history uses broker REST APIs, and the engine sends orders to the brokers. MARKET DATATRADINGDuckDBhistorySQLitecontrolParquetsymbolsUINext.jsbackendsole DB writerFastAPI · MCPauth · accountsschedulercron → jobs.*Redishot cacheNATScore + JetStreammd.tick · md.minute · md.greeksjobs.* · orders.*streamticks, candlesmd.tickgreeksIV, Δ Γ Θ νmd.greekshistory1m backfilljobs.historystrategyminute looplegs.rpclegsSL · target · trailorders.cmdengineslicing, limitsorders.eventBroker APIsKite · FYERS · Angel One · 5paisa · UpstoxKotak · Nubra · Arrow · Pocketful · DeltaWebSocketRESTorders

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 ​

ServiceResponsibility
FrontendSetup, strategy editing, market data and account monitoring
BackendControl API, configuration and database writes
StreamBroker WebSocket connections, normalized ticks and closed minute candles
HistoryDownload missing historical candles from broker accounts
StrategyLoad Python strategy classes and run their lifecycle hooks
LegsTrack entries, exits, stops, targets and fills by account
EngineRoute live orders, apply slicing and track broker responses
SchedulerCoordinate 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.