A hot-configurable Redis sink for the Kalshi Websockets API. Achieves sub-millisecond wire-to-wire writes.
This project builds two binaries: the kalshi-mdp-server
that provides the core functionality, and the kalshi-mdp-client
, a basic shell tool to retrieve snapshots from Redis.
- A Redis server running locally
- A Kalshi account to connect with, configured in
src/constants.rs
From the root directory, build with Cargo: cargo build --release
To build the debug or development release, run cargo build
.
The server binary accepts space-delineated Kalshi tickers to listen to data on.
Example: ./target/release/kalshi-mdp-server <ticker 1> <ticker 2> ...
To see logs, run with the RUST_LOG
environment variable:
RUST_LOG=<log level> ./target/release/kalshi-mdp-server ...
The client binary pulls and displays the latest snapshot for a single ticker.
Usage: ./target/release/kalshi-mdp-client <ticker>
The developers of kalshi-mdp feel they should thank the developers of the following crates for they play a pivotal role in this application:
The developers welcome pull requests (and will likely contribute themselves) for the following useful features:
- Filter out zero-quantity book entries
- A TCP server to accept live subscription and unsubscription requests
- Improved post-build configuration via YAML, etc.
- Support for alternative storage or message formats, like Kafka