SmartQuant logo SmartQuant

SmartQuant Product

QuantRouter

Centralized management of event streams and subscriptions, with delivery across clients, providers, and services.

Overview

QuantRouter is SmartQuant's server-side component for centralized management of event streams and messages. It receives events from providers and clients, tracks subscriptions, and routes data between system components.

QuantRouter helps you build a distributed trading infrastructure: strategies, monitoring tools, data storage, and providers can run as separate processes and/or on different machines, while the router ensures events are delivered to the clients that need them.

Why QuantRouter

In real trading systems, market data feeds and broker connections are limited and often expensive. QuantRouter addresses the typical infrastructure challenges:

  • Single connection point to providers: connect once at the router, serve many downstream clients.
  • Stream replication (fan-out): one incoming market data stream can be delivered to multiple strategies and monitoring tools.
  • Centralized subscription management: the router knows who is subscribed to which instruments and can reduce/optimize upstream subscriptions.
  • Decoupled components: strategies are not tied to a specific provider implementation - clients only specify which provider to use for data and/or execution.
  • Unified event delivery: some messages are delivered point-to-point (via ReceiverId), others can be broadcast to all connected clients.

What gets routed

Market data and events

Quotes and trades, order book snapshots/updates, bars/candles, news, fundamentals, provider status changes, etc.

Trading and execution

Order send/cancel/replace, execution reports, errors, service messages, and state events.

How it works (high-level)

  • Clients send subscribe/unsubscribe messages (for example, MessageProviderSubscribe / MessageProviderUnsubscribe).
  • The router maintains an instrument-based subscription table and forwards instrument events to all subscribed clients.
  • For service messages, QuantRouter supports targeted delivery to a specific client (via ReceiverId) as well as broadcast delivery to all connected clients.

Key capabilities

Instrument-level routing

Events are delivered only to clients that subscribed to the corresponding instrument.

Multi-client support

Run multiple strategies, monitors, and services concurrently.

Network service

Runs as a standalone service and accepts client connections over TCP.

Operational simplicity

The server port is configured in appsettings.json (default: 1559).

Role in the SmartQuant architecture

Within SmartQuant, QuantRouter acts as the transport layer for events and commands. It connects providers, strategies, and observability tools into a single event-driven system.

Typical usage scenarios

1) Multiple strategies consume data from a single provider

Several strategies subscribe to the same market data stream. QuantRouter replicates the feed and delivers it to all subscribed clients.

2) Persist market data into QuantBase while trading live

The same market data stream can simultaneously:

  • be written into QuantBase for testing, analysis, and playback;
  • be delivered to one or more strategies for live trading.

3) Multiple strategies trade through the same broker/account

Multiple strategies can send orders to a single broker/provider using a shared trading account. Commands and execution reports go through QuantRouter and are delivered to interested clients.

4) Separate monitoring and alerting without modifying strategies

Monitoring tools (for example, QuantMonitor/QuantWeb) can connect to the router as regular clients, subscribe to events, and build diagnostics/alerts without installing additional modules into strategies.

Configuration and operations

Providers are typically configured and maintained centrally on the router side. Strategies (and other clients) only need to specify:

  • which provider to use for market data;
  • which provider to use for order routing/execution.

This approach simplifies operations (one place to configure), reduces connection costs, and makes the system easier to scale.