A multi-broker algorithmic trading engine written in modern C++23. SlickTrader connects to exchanges over WebSocket/REST, routes market data and order events through a lock-free messaging core, runs trading strategies as plugins, and serves a real-time web dashboard for monitoring and manual trading.
Status: 0.11.0. The Coinbase and Hyperliquid brokers are built in, and more can be built in from their own repositories. Order execution needs broker credentials. The sample config is production (
"environment": "Production"): Coinbase market data and orders go to the real exchange. See Known gaps before you rely on any of this.
- Multi-broker: Coinbase Advanced Trade and Hyperliquid today. Market data and order
execution are separate per-broker connectors behind the
IBrokerinterface. - Lock-free messaging core: connectors, the strategy manager and the web server exchange
events through slick-queue and a
stream_buffer_multiplexer. - Strategy plugins: strategies are shared libraries (
.dll,.so,.dylib) loaded when the engine starts, so no engine rebuild is needed to change strategy logic. Parameters can be changed live from the dashboard. Replacing a plugin binary needs a restart. - Positions, PnL and risk: FIFO lots, realized and unrealized PnL, futures multipliers and pre-trade limits (position, order value, order rate, max loss). Positions can survive a restart.
- Market-by-order books and queue position for brokers whose feed carries every order.
- Live web dashboard: a Preact frontend with no build step, served over uWebSockets with a REST API. A click-to-trade ladder and other tools open in popup windows that save as named workspaces.
- Manual and automated trading side by side: a built-in
ManualStrategyowns orders placed from the dashboard, under the same risk and position tracking as plugin strategies.
Requirements: a C++23 compiler (MSVC 2022, GCC 14 or Apple clang from Xcode 16), CMake 3.28 or
newer, and vcpkg for uWebSockets, nlohmann_json and
GTest. Everything else is found as an installed package or fetched. See
Building for options and details.
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Debug --parallel
ctest --test-dir build -C Debug --output-on-failureCopy config/config_example.json to config/config.json
(gitignored) and edit it, then run the engine with the config path as its only argument:
build/src/Debug/slick-trader config/config.jsonOpen http://localhost:<web_server_port> for the dashboard and stop the engine with Ctrl+C.
Each release also ships a ready-to-run
package for Windows, Linux and macOS.
The example trades on real Coinbase. To try it against a simulator first, see Simulator and slick-sim.
Full documentation is published at https://slickquant.github.io/slick-trader/:
- Internals: architecture and threading, order lifecycle, market data, positions, PnL and risk
- Strategies: writing a strategy, strategy reference
- Brokers: brokers, adding a broker
- Integration: configuration reference, REST API, WebSocket, web dashboard, simulator
- Build and test: building, testing
- Known gaps: stubs, half-wired paths and sharp edges. Read it before you debug anything surprising
- API reference: Doxygen
The sources live in docs/ and render on GitHub too.
# narrative docs, live preview on http://127.0.0.1:8000
pip install -r requirements-docs.txt
mkdocs serve
# API reference (needs doxygen and graphviz on PATH), output in doxygen-out/html
cmake -S . -B build
cmake --build build --target docsThe docs target only appears when find_package(Doxygen) succeeds. A normal build is
unaffected without Doxygen.
include/slick-trader/ Public headers (.hpp): core, brokers, strategy, events, market_data, web, utils
src/ Implementation, each broker under src/brokers/<name>/, plus main.cpp
cmake/ Build helpers such as slick_trader_add_broker()
strategies/ Strategy plugins built as shared libraries, with example configs
tests/ GoogleTest suite and fixtures
web/static/ Dashboard frontend (HTML, CSS, JS)
config/ Runtime configs (only config_example.json is checked in)
docs/ MkDocs sources for the documentation site
- Headers use the
.hppextension. - Shared state is single-writer and lock-free by design where it can be. See Architecture for where it is not.
- Bug fixes come with a regression test.
MIT, see LICENSE.