flâneur

royluo20/mochi-manifold-kalshi-bot ·

github.com · saved by 1 readers

A low-latency trading bot that keeps Manifold Markets prices in line with Kalshi. It streams Kalshi's order books and Manifold's prices over WebSockets. When a Manifold answer drifts past the Kalshi quote, it sends an immediate-or-cancel limit order that moves Manifold back to the quote. The repo has two parts: Risk. This places real orders with your Manifold account. Run with dry_run: true until the log looks right. No warranty; see Disclaimer. For every pair (one Manifold answer ↔ one Kalshi market), on every price change from either side: Optional: with kalshi_probe_candidates > 0, the trader opens N extra Kalshi connections at startup, measures them for about a minute, and keeps the fastest. A connection's speed is fixed for its lifetime, so each restart re-rolls it. Manifold's API runs in Google Cloud us-east4 (behind Cloudflare). A small VM in that region keeps order latency low. The steps below are for Debian/Ubuntu on GCP; any Linux host works the same way. One trader uses a fe

saved by