Building async_rithmic: A Modern Python Wrapper for the Rithmic Trading API
Posted on Mon 04 August 2025 in Quant Development
Introduction
If you've ever tried to build trading software on top of the Rithmic API, you know how painful it can be. Between the raw C++ interface, COM wrappers, and obscure vendor tooling, it's easy to get lost in the weeds before you even place your first order.
That's why I built async_rithmic: a clean, modern, asynchronous Python wrapper around the Rithmic trading API.
Why I Built It
When I started working on low-latency futures strategies, I needed access to real-time market data, order placement, and account info from Rithmic. The problem? None of the Python bindings felt usable.
- The official SDK is meant for C++ or C# developers and has minimal documentation.
- Third-party wrappers like
pyrithmic
worked, but were either blocking, had architectural flaws, poorly documented, or not actively maintained.
As someone writing modern Python with async/await, I wanted a native experience: something I could plug into my event loops, compose with other async code, and understand deeply.
So I wrote my own.
What async_rithmic
Does
async_rithmic
gives you a lightweight Python interface for interacting with the Rithmic API, built on modern design principles.
- ✅ Async-first API: integrates cleanly with any async Python code
- 📦 Streaming market data: subscribe to multiple symbols, L1 and L2
- 🛠️ Order placement + management: place, cancel, modify orders
- 📊 Fills, account updates, positions: streamed in real time
- 🔌 Handles reconnects
The project is open source on GitHub and actively maintained. It also comes with full documentation on ReadTheDocs.
What Makes It Different
async_rithmic
is designed for people building real systems, whether you're a prop trader, quant researcher, or running your own algo stack.
Some of the things I focused on:
- Performance: minimal overhead between Rithmic callbacks and Python event handlers
- Correctness: handles quirks of the native API like reconnects and async coordination
- Developer Experience: type hints, sensible abstractions, and a testable interface
If you're writing a trading bot or building out your own market data stack, this should feel natural to drop in.
Try It Yourself
To install the package:
pip install async_rithmic
Then initialize the connection, subscribe to data, and place orders using async methods. Here's a simple snippet:
import asyncio
from async_rithmic import RithmicClient
async def main():
client = RithmicClient(
user="your_username",
password="your_password",
system_name="Rithmic Test",
app_name="my_test_app",
app_version="1.0",
url="rituz00100.rithmic.com:443" # Example: test gateway only
)
await client.connect()
contract = await client.get_front_month_contract("ES", "CME")
print(f"ES front month contract: {contract}")
await client.disconnect()
asyncio.run(main())
More examples can be found in the docs.
Star It, Use It, Fork It
If you find this project useful, please consider starring the repo. That helps others discover it, and gives me a better signal to keep improving it.
You can find the full open-source Rithmic Python API here:
👉 https://github.com/rundef/async_rithmic
📖 https://async-rithmic.readthedocs.io/
Thanks for reading. If you're building anything cool on top of it (or want to contribute), feel free to reach out.
Happy trading.