Rithmic is the high-performance futures data and order routing network used by many prop firms and futures brokerages. The QuanuX Rithmic extension is a pure Go implementation that speaks the Rithmic wire protocol directly — no C++ R/API+ libraries, no Python bridges. It connects to Rithmic’s WebSocket servers using SSL, exchanges Protocol Buffer messages, and publishes live tick data to the QuanuX core over a ZeroMQ socket.Documentation Index
Fetch the complete documentation index at: https://docs.quanux.org/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
The extension runs as a QXP sidecar process. Market data flows from Rithmic’s cloud into the Go extension, which then broadcasts ticks to the QuanuX core over a ZMQ PUB socket on port 5557. Order commands travel in the reverse direction. Key components:- Official Protobufs: The extension uses the official Rithmic
.protoschema (v0.87.0.0+), compiled to Go bindings inextensions/rithmic/api/. Do not edit these files manually. - Go runtime: Pure Go for minimal latency and mostly garbage-free streaming.
- ZeroMQ data pump: All market data ticks are broadcast via a ZMQ PUB socket on port
5557.
The Rithmic wire protocol
Understanding the protocol helps you troubleshoot connection issues.Message framing
Every message — both sent and received — is prefixed with a 4-byte Big Endian integer that indicates the payload length in bytes:Template IDs
Rithmic identifies message types using atemplate_id field present in every Protobuf message. The extension routes incoming messages by reading this field first.
| Template ID | Message name | Description |
|---|---|---|
10 | RequestLogin | Primary authentication request |
11 | ResponseLogin | Auth result — check rp_code field |
16 | RequestRithmicSystemInfo | Step 1 of the connection handshake |
17 | ResponseRithmicSystemInfo | Returns available Rithmic system names |
18 | RequestHeartbeat | Keepalive — send every 30 seconds |
19 | ResponseHeartbeat | Server acknowledgement of heartbeat |
100 | RequestMarketDataUpdate | Subscribe or unsubscribe from a symbol |
150 | LastTrade | Live tick data for a subscribed symbol |
Authentication handshake
Rithmic requires a two-step connection sequence before you can subscribe to market data. Step 1 — Discovery:- Open a WebSocket connection to the Rithmic URL.
- Send
RequestRithmicSystemInfo(template ID16). - Receive
ResponseRithmicSystemInfo(template ID17), which lists valid system names (for example,"Rithmic Paper Trading"). - Close this connection.
- Open a new WebSocket connection.
- Send
RequestLogin(template ID10) with thesystem_nameobtained in Step 1. - Receive
ResponseLogin(template ID11). - If
rp_code == "0", you are authenticated and can subscribe to symbols.
RequestHeartbeat (template ID 18) every 30 seconds. The server will disconnect you if you miss a heartbeat interval. The exact interval may also be specified in the heartbeat_interval field of the login response.
Setup
Set your credentials
Store your Rithmic credentials in the OS keyring using Replace
quanuxctl:"Rithmic Paper Trading" with the system name provided by your broker or prop firm (for example, "Rithmic 01 Chicago" for live trading). Replace the URL with the WebSocket endpoint your firm specifies.Export environment variables
Before starting the extension, export your credentials into the shell environment:
Generate a bridge key
If you have not already done so, generate a bridge key so the extension can authenticate to the QuanuX core:
- Open the QuanuX web interface.
- Go to Settings → QuanuX Extensions.
- Click Generate Key and copy the value.
- Store it:
quanuxctl secrets set QUANUX_RITHMIC_BRIDGE_KEY "your_key_here"
Required environment variables
| Variable | Description | Example |
|---|---|---|
QUANUX_RITHMIC_USER | Your Rithmic username | jsmith |
QUANUX_RITHMIC_PASS | Your Rithmic password | — |
QUANUX_RITHMIC_SYSTEM | Rithmic system name from your broker | Rithmic Paper Trading |
QUANUX_RITHMIC_URL | Rithmic WebSocket server URL | wss://rituz00100.rithmic.com:443 |
QUANUX_BRIDGE_KEY | Local bridge key for QuanuX core auth | — |
Directory structure
Regenerating Protobuf bindings
If Rithmic releases a new schema version, regenerate the Go bindings from the updated.proto files:
If the
.proto files are missing a go_package option, a patch script in the extension directory injects it automatically before running protoc.Subscribing to market data
Once the extension is running, send aRequestMarketDataUpdate (template ID 100) with your exchange and ticker to begin receiving LastTrade (template ID 150) ticks over the ZMQ PUB socket on port 5557.
QuanuX strategies subscribed to the same ZMQ topic receive ticks in real time without any additional configuration.