Skip to content

Slick Trader

slick-trader is a multi-broker trading engine written in C++23. Broker connectors publish market data and order events onto lock-free queues. A single strategy-manager thread consumes them, runs your strategies and owns positions, PnL and risk. A web server on its own thread serves a live dashboard and a REST and WebSocket API.

Strategies are shared libraries. The engine loads them once at startup, and their parameters can then change live through the API without a restart. Any SlickQuant broker can be built in from its own repository.

What it does today:

  • Brokers: Coinbase Advanced Trade and Hyperliquid are built in. Each broker is a market data connector and an order connector with its own threads. Out-of-tree brokers plug in through the same interface.
  • Strategies: plugins inherit StrategyBase, which checks every order against the risk manager and the brokers' connection status. market_maker and order_stacker ship as examples. A built-in MANUAL strategy owns the orders you place by hand.
  • Positions, PnL and risk: FIFO lots, realized and unrealized PnL with contract multipliers, and pre-trade limits for position size, order value, order rate and loss. Positions can persist across restarts.
  • Dashboard: a click-to-trade ladder and other tools, each in its own window, saved as workspaces.
  • Simulator link: in the Sim environment the engine talks to slick-sim to show its feeds and start pcap replay.

Understanding the system

Read in this order if you are new to the codebase.

Page What it covers
Architecture The threads, the queues that connect them, startup and shutdown order, and the component map
Order lifecycle One order traced from a strategy or the dashboard through risk checks and a connector to its fills
Market data Subscriptions, per-broker request queues, the event types connectors publish and how books are built
Positions, PnL and risk FIFO position tracking, PnL arithmetic, risk limits and halts, and the position store

Writing strategies and adding brokers

Page What it covers
Writing a strategy The plugin ABI, StrategyBase hooks, building and loading a plugin, and testing it
Strategy reference The example strategies, their parameters and risk limits
Brokers The two built-in brokers: what each connector supports and how it behaves
Adding a broker The IBroker interface, registration, build wiring and shared building blocks for a new venue

Integrating and operating

Page What it covers
Configuration Every configuration key the code reads, with defaults and source references
REST API The HTTP routes for positions, PnL, orders, strategies, risk and workspaces
WebSocket The live feed the dashboard uses: channels, message shapes and subscriptions
Web dashboard The browser tools, ladder controls, workspaces and Windows popup setup
Simulator Running against slick-sim: the Sim environment, the control link and pcap replay
Building Toolchain, dependencies, build options, sanitizers, CI and releases
Testing The GoogleTest suite, its fixtures and a map of what each file covers

Before you rely on any of this

slick-trader is under active development. Some code paths are stubs or behave differently from what you would expect, and one broker's order entry cannot connect yet. Check Known gaps before you run it against real money or while investigating unexpected behaviour.

Elsewhere