Slick Sim¶
slick-sim serves a venue's order-entry and market-data APIs on local ports. Clients use the same
REST routes, WebSocket channels and message formats as on the real exchange. An in-process FIFO
matching engine fills their orders without risking capital.
What your orders match against depends on how you configure the market-data feed:
- Shadowing: connect a live feed and
slick-simmirrors the real venue's book, so your orders compete against real, currently-quoted liquidity. - Self-contained: omit the feed and it behaves like a conventional exchange simulator. Books start empty and clients trade only against each other.
- Historical replay: on CME and ICE, point a pcap feed at recorded multicast captures and
slick-simreplays them once a client sends START. See PCAP replay.
See Operating modes.
CME and ICE are built out of tree. The two venues in this repository differ in how order results get back to you:
- Coinbase — you submit orders over REST, but acks, fills and
cancels arrive on a separate WebSocket (
userchannel). The REST call returns only aPENDING_NEWacknowledgement, so a REST-only client never learns that its order traded. Market data is a third endpoint, its own WebSocket. - Hyperliquid — you submit orders over REST and the result comes back in that same HTTP response. There is no push channel for fills at all. Market data is a separate WebSocket.
Understanding the system¶
Read in this order if you are new to the codebase.
| Page | What it covers |
|---|---|
| Architecture | The shadowing model, component map, threading model, and the lock-free queues that connect everything |
| Order lifecycle | One order traced end to end, from HTTP request to execution report, plus every status and reject-reason enum |
| Matching engine | FIFO and pro-rata matching, time-in-force handling, self-match prevention, trade summaries, fixed-point arithmetic |
| Order book | The single L3 book holding both real-market phantom liquidity and simulated user orders, and how the two are kept apart |
| Market data | Feed ingestion, per-venue event sequencing, how venue trade prints are matched rather than relayed, and the internal binary market-data wire format |
| Adding an exchange | A checklist for implementing a new venue adapter, grounded in the two that work |
Integrating a client¶
| Page | What it covers |
|---|---|
| Configuration | Every configuration key the code actually reads, with defaults and source references |
| CLI | The command port for changing a running simulator, with its Python client and wire format |
| Coinbase | Implemented REST routes, order-entry WebSocket channels, market-data channels, worked examples |
| Hyperliquid | /exchange actions, the /info upstream proxy, market-data channels, worked examples |
| Integration tests | The end-to-end Coinbase suite: what it covers, how to run it, how to debug a failure |
Before you rely on any of this¶
slick-sim is under active development. Some code paths are stubs or behave differently from the
intended design. Check Known gaps when investigating unexpected behaviour.
Elsewhere¶
- API reference — Doxygen-generated C++ reference for
src/. - Repository README — prerequisites, build instructions, CI and release process.