The TopstepX integration gives QuanuX full access to the TopstepX platform: account management, order execution, position tracking, and real-time market data. It is split into two decoupled components that run alongside the QuanuX core. The TopstepX extension handles REST API calls — authentication, orders, account queries, and trade history. The SignalR bridge maintains a persistent WebSocket connection to TopstepX’s real-time hubs, streaming market data and user events into the QuanuX message bus.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 two components are independent. You can run the REST extension without the SignalR bridge if you only need account management and order placement, or run just the bridge if you only need real-time data.Prerequisites
You need three pieces of information from TopstepX before you can connect:- Username: your TopstepX account username
- Password: your TopstepX account password
- API key: your TopstepX API key, available from the TopstepX dashboard
Setup
Store your credentials
Use
quanuxctl to save your TopstepX credentials to the OS keyring. These are never written to a file on disk.Verify your environment
Confirm that all credentials are accessible:This command reads each credential from the keyring and prints its status without revealing the values.
Install Python dependencies
The TopstepX REST extension is Python-based. Install its dependencies:This installs the packages required by
extensions/python/topstepx.Generate a bridge key
Generate a key so both extensions can authenticate to the QuanuX core:
- Open the QuanuX web interface.
- Go to Settings → QuanuX Extensions.
- Click Generate Key and store the value:
Credentials reference
All credentials are managed throughquanuxctl and stored in the OS keyring under the following keys:
| Keyring key | quanuxctl command | Description |
|---|---|---|
QUANUX_TOPSTEP__USERNAME | quanuxctl topstepx user | TopstepX account username |
QUANUX_TOPSTEP__PASSWORD | quanuxctl topstepx password | TopstepX account password |
QUANUX_TOPSTEP__API_KEY | quanuxctl topstepx apikey | TopstepX API key |
Endpoint configuration
The extensions connect to TopstepX’s production endpoints by default. You can override any endpoint — for example, to point at a simulation environment.| Variable | Default | Description |
|---|---|---|
QUANUX_TOPSTEP__BASE_API_URL | https://api.topstepx.com | REST API base URL |
QUANUX_SIGNALR_USER_HUB | https://rtc.topstepx.com/hubs/user | Real-time user events hub |
QUANUX_SIGNALR_MARKET_HUB | https://rtc.topstepx.com/hubs/market | Real-time market data hub |
Managing the SignalR bridge
The bridge runs as a separate process managed by QuanuX. It maintains a persistent WebSocket connection to both TopstepX real-time hubs.The SignalR bridge uses a Node.js worker by default to handle TopstepX’s proprietary SignalR protocol. A Flask fallback is also available if Node.js is not present.
REST extension modules
The TopstepX Python extension lives inextensions/python/topstepx/src. Its modules correspond directly to the TopstepX API surface:
| Module | Purpose |
|---|---|
auth.py | Authentication and token lifecycle management |
orders.py | Order placement and management |
positions.py | Position tracking |
history.py | Historical bar retrieval |
REST API endpoints
The QuanuX server exposes the following routes for the TopstepX integration. These are used internally by the QuanuX core and can also be called directly for debugging.- Authentication
- Accounts
- SignalR connect
- SignalR subscribe
POST
/topstep/loginAuthenticates with TopstepX and returns a session token.