Kalshi-Polymarket-Ai-bot  by CraftyGeezer

Automated arbitrage bot for cross-platform prediction markets

Created 4 days ago

New!

691 stars

Top 49.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project offers an open-source, cross-platform arbitrage bot designed for Kalshi and Polymarket prediction markets. It automates the detection and execution of price discrepancies, leveraging a hybrid Rust/Python architecture and AI validation to identify and capitalize on risk-free profit opportunities for technically savvy users.

How It Works

The bot employs a dual-runtime architecture: a high-performance Rust core (kalshi_arb_core) handles microsecond market scanning and Kelly criterion position sizing, while a Python layer manages asynchronous API clients, OpenAI GPT-4o for opportunity validation, and order execution. This combination offers Rust's speed for critical calculations with Python's flexibility for integration and AI.

Quick Start & Requirements

Installation is streamlined for macOS via a single curl command that automates dependency management, including Homebrew, Rust, and Python 3.11+. Users require macOS 12 Monterey or later. Configuration involves filling API credentials for Kalshi, Polymarket, and OpenAI into a .env file. The project provides a clear progression from dry-run and demo modes to live trading.

Highlighted Details

  • macOS Native: One-command installation script.
  • Rust Arbitrage Core: PyO3 extension enables microsecond scanning, significantly faster than pure Python.
  • AI-Powered Validation: GPT-4o filters opportunities, assessing confidence and rejecting stale data or illiquid artifacts.
  • Kelly Criterion Sizing: Implements optimal position sizing based on edge and odds.
  • Cross-Platform Matching: Robust engine aligns events across Kalshi tickers and Polymarket slugs using fuzzy and exact matching.
  • Safety Features: Includes dry-run mode, Kalshi demo support, liquidity filters, and a Kelly cap to mitigate risk.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack).

Licensing & Compatibility

The project is released under the MIT License. It is intended for educational and research purposes, and users trade at their own risk, with no warranty of profitability or accuracy.

Limitations & Caveats

The bot is exclusively designed and tested for macOS; Linux and Windows are unsupported. While aiming for risk-free arbitrage, concurrent order execution carries a risk of partial fills if one leg fails. Users must verify the legality of prediction market trading in their jurisdiction. Polymarket usage necessitates a Polygon wallet with MATIC for gas fees and USDC for collateral.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
781 stars in the last 4 days

Explore Similar Projects

Feedback? Help us improve.