Skip to main content
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.

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 .proto schema (v0.87.0.0+), compiled to Go bindings in extensions/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 a template_id field present in every Protobuf message. The extension routes incoming messages by reading this field first.

Authentication handshake

Rithmic requires a two-step connection sequence before you can subscribe to market data. Step 1 — Discovery:
  1. Open a WebSocket connection to the Rithmic URL.
  2. Send RequestRithmicSystemInfo (template ID 16).
  3. Receive ResponseRithmicSystemInfo (template ID 17), which lists valid system names (for example, "Rithmic Paper Trading").
  4. Close this connection.
Step 2 — Login:
  1. Open a new WebSocket connection.
  2. Send RequestLogin (template ID 10) with the system_name obtained in Step 1.
  3. Receive ResponseLogin (template ID 11).
  4. If rp_code == "0", you are authenticated and can subscribe to symbols.
Heartbeat: After login, you must send 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.
If the Rithmic server disconnects unexpectedly, check that your heartbeat loop is running and that no firewall or proxy is silently dropping idle WebSocket connections.

Setup

1

Set your credentials

Store your Rithmic credentials in the OS keyring using quanuxctl:
Replace "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.
Never commit Rithmic credentials to version control. The quanuxctl secrets commands store values in the OS keyring, not in any file on disk.
2

Export environment variables

Before starting the extension, export your credentials into the shell environment:
3

Generate a bridge key

If you have not already done so, generate a bridge key so the extension can authenticate to the QuanuX core:
  1. Open the QuanuX web interface.
  2. Go to Settings → QuanuX Extensions.
  3. Click Generate Key and copy the value.
  4. Store it: quanuxctl secrets set QUANUX_RITHMIC_BRIDGE_KEY "your_key_here"
4

Start the extension

Run the Rithmic extension from its directory:
On startup, the extension performs the two-step handshake, then begins the heartbeat loop. Once connected, you can subscribe to symbols from the QuanuX core or via quanuxctl.

Required environment variables

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 a RequestMarketDataUpdate (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.