Kalshi Trader
/install kalshi-trader
Kalshi Trader
Automated prediction market trading on Kalshi. Scans every 15 minutes, researches before every trade, reports daily via Telegram.
Setup (run once)
1. Install dependencies
pip install cryptography requests --break-system-packages
2. Store Kalshi credentials
mkdir -p ~/.kalshi && chmod 700 ~/.kalshi
nano ~/.kalshi/private_key.pem # paste -----BEGIN RSA PRIVATE KEY----- block
chmod 600 ~/.kalshi/private_key.pem
echo "YOUR-API-KEY-ID-HERE" > ~/.kalshi/key_id.txt
chmod 600 ~/.kalshi/key_id.txt
Get your API key at: kalshi.com → Settings → API → Create Key
3. Deploy the bot
cp scripts/kalshi_bot.py ~/kalshi_bot.py
chmod 600 ~/kalshi_bot.py
4. Test connection
python3 ~/kalshi_bot.py test
5. Set up cron jobs (via OpenClaw cron tool)
15-minute scan (silent unless trade placed or exited):
- Schedule:
*/15 * * * * - Message: see references/cron-prompt.md
Daily summary (9am your timezone):
- Schedule:
0 9 * * *with your timezone - Message: "Run
python3 ~/kalshi_bot.py summaryand send daily trading report with balance, open positions, recent trades, P&L, and fees paid."
Trading Rules
Entry criteria
Only place a trade if EV IRR ≥ 50% (post-fee):
edge = fair_value - (market_price + entry_fee)
EV IRR = (edge / (market_price + entry_fee)) × (365 / days_to_close)
Minimum: EV IRR ≥ 0.50 (50%)
Position sizing — Half Kelly
kelly_fraction = (edge / market_price) × 0.5
max_position = min(kelly_fraction × balance, 0.20 × balance)
contracts = floor(max_position / market_price)
Exit rule
Exit ONLY if current bid ≥ fair value estimate (net of exit fee).
- Never use price-based stop losses — prediction markets resolve on facts, not on what other traders think
- If price drops, research whether the underlying facts changed
- Only exit early if: (a) price reached fair value, or (b) new evidence shows the outcome is unlikely
Research approach
Use web_fetch as primary research tool (no quota limits). Known data sources:
- Gas prices:
https://gasprices.aaa.com/ - Trump actions:
https://www.whitehouse.gov/presidential-actions/ - Treasury yields:
https://home.treasury.gov/resource-center/data-chart-center/interest-rates/ - Bitcoin/crypto:
https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd - Weather:
https://wttr.in/CityName?format=3 - Congress bills:
https://www.congress.gov
Only use web_search for open-ended research where the URL isn't known upfront.
Bot Commands
python3 ~/kalshi_bot.py # scan for opportunities
python3 ~/kalshi_bot.py summary # print P&L summary
python3 ~/kalshi_bot.py test # verify API connection
Reporting format (include in every update)
- 💰 Cash balance
- 📦 Total position cost
- 📈 Current market value of positions
- 💹 Unrealized P&L
- 💸 Total Kalshi fees paid
- 🏦 Total portfolio value
API reference
See references/api.md for Kalshi authentication and endpoints.
Trade research workflow
See references/trade-research.md for finding and evaluating opportunities.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install kalshi-trader - 安装完成后,直接呼叫该 Skill 的名称或使用
/kalshi-trader触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Kalshi Trader 是什么?
Automated Kalshi prediction market trading bot. Sets up a fully automated trading system that scans markets every 15 minutes, researches opportunities using... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 122 次。
如何安装 Kalshi Trader?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install kalshi-trader」即可一键安装,无需额外配置。
Kalshi Trader 是免费的吗?
是的,Kalshi Trader 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Kalshi Trader 支持哪些平台?
Kalshi Trader 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Kalshi Trader?
由 bobthemom987(@bobthemom987)开发并维护,当前版本 v1.0.0。