Appearance
Octagon CLI
The Octagon CLI (Kalshi Trading Bot CLI) is an AI agent that runs deep research on every Kalshi market, computes edge against the live order book, and executes trades from your terminal. It is powered by the Octagon Research API.
Repository: Kalshi Trading Bot CLI on GitHub
What it does
- AI agent loop: natural-language queries trigger up to 10 tool-use iterations across Kalshi and Octagon. Bring your own LLM key (OpenAI, Anthropic, Google, xAI, OpenRouter, or local Ollama).
- Edge detection: Octagon's model probability minus the live order book is surfaced per market, ranked across the universe, half-Kelly sized, and filtered through a 5-gate risk engine (Kelly, liquidity, correlation, concentration, drawdown) before a dollar is risked.
- Diversified baskets: one-call basket construction pushes universe selection, thematic-cluster caps, pairwise-correlation gating, and Kelly sizing server-side.
Install
bash
bunx kalshi-trading-bot-cli@latestRequires Bun >= 1.1 (the CLI uses bun:sqlite and runs .tsx directly). No clone, no install: the setup wizard runs on first launch and writes your keys to ~/.kalshi-bot/.env.
For scripting or parallel use, install globally and call the kalshi binary directly:
bash
bun add -g kalshi-trading-bot-cliConnect Octagon
Set OCTAGON_API_KEY to unlock deep research (analyze), edge scanning (search edge), and the Octagon-backed discovery and basket commands (search, similar, clusters, peers, correlate, basket). Get a key at app.octagonai.co. Without it, search falls back to the local SQLite cache.
Key commands
- Discovery:
search [query],search edge,similar <ticker>,clusters,peers <ticker> - Baskets & portfolio:
correlate <t1> <t2>,basket build,basket backtest,basket size,basket validate - Trading & account:
analyze <ticker>,buy / sell <ticker> <count>,portfolio,backtest
The full reference covers 40+ commands and every flag — see the User Guide.
Agent and JSON usage
Every command supports --json, returning a stable envelope ({ ok, command, data, meta, timestamp }) with exit code 0 on success and 1 on failure — easy to orchestrate from scripts or AI agents. For parallel or scripted invocations, install globally and use the kalshi binary instead of bunx to avoid install chatter and cache races.