OctagonAI/kalshi-trading-bot-cli

AI-native CLI for trading Kalshi prediction markets. Runs deep fundamental research, generates independent probability estimates, computes edge vs. live order books, and executes trades with Kelly sizing and a 5-gate risk engine.

What it solves

This project provides a command-line interface (CLI) for trading on Kalshi, a prediction market. It solves the difficulty of finding "edge" (profitable opportunities) by combining AI-driven probability estimates with real-time market data, automating the research, risk management, and execution of trades.

How it works

The bot integrates with the Octagon Research API to fetch AI-generated probability estimates for various markets. It calculates the "edge" as the difference between the model's predicted probability and the live order book price. To manage risk, it uses a half-Kelly sizing strategy and a five-gate risk engine to determine how much to invest. Users can search for markets, analyze specific tickers, build diversified baskets of trades using correlation and cluster analysis, and execute buys or sells directly from the terminal.

Who it’s for

It is designed for prediction market traders who want a data-driven, AI-assisted approach to trading on Kalshi, as well as developers who want to programmatically interact with the exchange via a CLI.

Highlights

  • AI-Powered Edge Detection: Uses Octagon Research to find discrepancies between model probabilities and market prices.
  • Advanced Portfolio Management: Includes tools for building diversified baskets with correlation caps and thematic clustering.
  • Risk Engine: Implements Kelly sizing and multiple risk gates (liquidity, correlation, concentration, and drawdown).
  • Learning Loop: Features a reflection system that turns settled positions into lessons and a falsifiable-claim registry for tracking hypotheses.
  • Comprehensive Analysis: Provides Brier scores for calibration, Pearson correlation matrices, and backtesting for baskets and strategies.

Related

  • Project
  • Project
  • Project
  • Project
  • Project