kalshi-trading-bot-cli  by OctagonAI

AI-native CLI for automated prediction market trading

Created 10 months ago
307 stars

Top 87.1% on SourcePulse

GitHubView on GitHub
Project Summary

An AI-native Command Line Interface (CLI) designed for automated trading on Kalshi prediction markets. It performs deep fundamental research, generates independent probability estimates, calculates trading edge against live order books, and executes trades using Kelly sizing and a multi-gate risk engine, targeting traders and power users seeking an automated, data-driven approach to market participation.

How It Works

The bot leverages AI models, integrated via APIs like Octagon Research, to conduct fundamental analysis on Kalshi markets. It generates proprietary probability estimates, identifies key price drivers, and assesses market catalysts. Trading edge is computed by comparing these model-derived probabilities against live order book prices. Trades are then sized using a half-Kelly criterion and passed through a 5-gate risk engine (Kelly, Liquidity, Correlation, Concentration, Drawdown) before execution, ensuring a disciplined and risk-managed approach.

Quick Start & Requirements

  • Primary install / run command: bunx kalshi-trading-bot-cli@latest (no clone/install needed). Global install: bun add -g kalshi-trading-bot-cli.
  • Non-default prerequisites: Bun ≥ 1.1 (required; Node.js is not supported), a Kalshi account with API access (API key + RSA private key), and at least one LLM provider key (OpenAI, Anthropic, Google, xAI, OpenRouter, Ollama). Optional: Octagon API key for AI edge analysis, Tavily API key for web research.
  • Setup: An interactive setup wizard automatically runs on first launch to collect necessary API keys.
  • Links: Bun installation: https://bun.com/install.

Highlighted Details

  • AI-driven deep fundamental research and independent probability estimation.
  • Edge detection by comparing model price to live order book data.
  • Trades sized with half-Kelly and filtered through a 5-gate risk engine.
  • Comprehensive backtesting framework with detailed performance metrics (Brier score, Skill Score, Hit rate, P&L).
  • All commands support --json output for seamless integration with scripts and AI agents.
  • Demo mode available for risk-free simulation.

Maintenance & Community

The README does not specify notable contributors, sponsorships, or community channels (e.g., Discord, Slack). Anonymous usage telemetry is collected by default to aid product improvement, which can be disabled via .env configuration.

Licensing & Compatibility

  • License type: MIT License.
  • Compatibility notes: The MIT license is permissive and generally compatible with commercial use and linking within closed-source projects.

Limitations & Caveats

A strict dependency on the Bun runtime environment is enforced, with Node.js being incompatible. Full functionality requires obtaining and configuring multiple API keys from Kalshi, an LLM provider, and optionally Octagon AI and Tavily. Telemetry is enabled by default, though configurable.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
114 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.