返回顶部
k

kalshi-trader卡尔希交易机器人

Automated Kalshi prediction market trading bot. Sets up a fully automated trading system that scans markets every 15 minutes, researches opportunities using direct web fetches, places trades based on strict EV IRR and half Kelly criteria, monitors positions, and sends daily Telegram summaries. Use when a user wants to automate Kalshi trading, set up a prediction market bot, configure market scanning, or get daily P&L reports from Kalshi.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
92
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

kalshi-trader

Kalshi 交易机器人

在Kalshi上进行自动化预测市场交易。每15分钟扫描一次,每次交易前进行研究,每日通过Telegram报告。

设置(仅需运行一次)

1. 安装依赖

bash pip install cryptography requests --break-system-packages

2. 存储Kalshi凭证

bash mkdir -p ~/.kalshi && chmod 700 ~/.kalshi nano ~/.kalshi/private_key.pem # 粘贴 -----BEGIN RSA PRIVATE KEY----- 块 chmod 600 ~/.kalshi/private_key.pem echo 你的API密钥ID > ~/.kalshi/key_id.txt chmod 600 ~/.kalshi/key_id.txt

在以下位置获取你的API密钥:kalshi.com → 设置 → API → 创建密钥

3. 部署机器人

bash cp scripts/kalshibot.py ~/kalshibot.py chmod 600 ~/kalshi_bot.py

4. 测试连接

bash python3 ~/kalshi_bot.py test

5. 设置定时任务(通过OpenClaw定时任务工具)

15分钟扫描(除非开仓或平仓,否则静默运行):

  • - 调度:/15 *
  • 消息:参见 references/cron-prompt.md

每日总结(你的时区上午9点):

  • - 调度:0 9 * 加上你的时区
  • 消息:运行 python3 ~/kalshi_bot.py summary 并发送包含余额、持仓、近期交易、盈亏和已付费用的每日交易报告。

交易规则

入场条件

仅当 EV IRR ≥ 50%(扣除费用后)时才进行交易:

edge = 公允价值 - (市场价格 + 入场费)
EV IRR = (edge / (市场价格 + 入场费)) × (365 / 距到期天数)

最低要求:EV IRR ≥ 0.50(50%)

仓位规模 — 半凯利公式

凯利比例 = (edge / 市场价格) × 0.5
最大仓位 = min(凯利比例 × 余额, 0.20 × 余额)
合约数量 = floor(最大仓位 / 市场价格)

退出规则

仅当当前买价 ≥ 公允价值估计(扣除退出费后)时退出。
  • - 绝不使用基于价格的止损——预测市场基于事实而非其他交易者的想法来结算
  • 如果价格下跌,研究底层事实是否发生变化
  • 仅在以下情况下提前退出:(a)价格达到公允价值,或(b)新证据表明结果不太可能发生

研究方法

使用 web_fetch 作为主要研究工具(无配额限制)。已知数据来源:
  • - 汽油价格:https://gasprices.aaa.com/
  • 特朗普行动:https://www.whitehouse.gov/presidential-actions/
  • 国债收益率:https://home.treasury.gov/resource-center/data-chart-center/interest-rates/
  • 比特币/加密货币:https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
  • 天气:https://wttr.in/城市名?format=3
  • 国会法案:https://www.congress.gov

仅在URL未知的开放式研究中使用 web_search。

机器人命令

bash
python3 ~/kalshi_bot.py # 扫描机会
python3 ~/kalshi_bot.py summary # 打印盈亏总结
python3 ~/kalshi_bot.py test # 验证API连接

报告格式(每次更新均包含)

  • - 💰 现金余额
  • 📦 总持仓成本
  • 📈 持仓当前市值
  • 💹 未实现盈亏
  • 💸 已付Kalshi总费用
  • 🏦 总投资组合价值

API参考

参见 references/api.md 了解Kalshi认证和端点。

交易研究工作流程

参见 references/trade-research.md 了解如何寻找和评估机会。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 kalshi-trader-1775941767 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 kalshi-trader-1775941767 技能

通过命令行安装

skillhub install kalshi-trader-1775941767

下载

⬇ 下载 kalshi-trader v1.0.0(免费)

文件大小: 8.96 KB | 发布时间: 2026-4-12 10:21

v1.0.0 最新 2026-4-12 10:21
Initial release of Kalshi Trader: automated Kalshi prediction market trading bot.

- Scans Kalshi markets every 15 minutes and researches opportunities using direct web fetches.
- Places trades based on strict EV IRR (≥50%) and half Kelly criteria.
- Manages positions and exits only if price meets fair value or if new information arises.
- Sends daily trading summaries—including cash balance, open positions, P&L, and fees—via Telegram.
- Comprehensive setup and usage instructions provided.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部