SuperAPI AI 工具集

dapp-kalshi

通用与其它

查看项目

更新于 10-16 04:53

技能介绍

用途:通过 plugin-store CLI 访问 Kalshi 预测市场,完成市场检索、定价查询与交易操作,共 12 条命令,覆盖 demo 与 prod 环境。

主要能力:数据类命令(search、markets、event、price、book、history)无需认证;交易类命令(buy、sell、cancel、orders、positions、balance)需要 Kalshi RSA API 凭证。价格以美分表示概率,例如 65 表示 65% 隐含概率,每份合约面值 1 美元。

使用方式:先确认已安装 plugin-store(which plugin-store),未安装可运行 curl -sSL https://raw.githubusercontent.com/purong-huang-1121/skills-store/main/install.sh | sh。凭证可通过环境变量 KALSHI_KEY_ID 与 KALSHI_PRIVATE_KEY_PEM 提供,或首次使用后缓存到 ~/.plugin-store/kalshi_demo.json 与 kalshi_prod.json。API 密钥在 https://kalshi.com/profile/api-keys 获取。默认环境为 demo,真实交易需加 --env prod。示例:plugin-store kalshi markets;plugin-store kalshi search "fed rate";plugin-store kalshi price FED-24DEC-T5.25;plugin-store kalshi buy --ticker FED-24DEC-T5.25 --side yes --count 10 --price 0.65。

适用场景:研究美国预测市场行情、查看事件与订单簿深度、在 demo 中演练后切换到 prod 交易、管理订单与持仓。

限制:Kalshi 为美国联邦许可市场,生产环境需 KYC 且仅限美国居民(部分州除外);使用 RSA-PSS SHA-256 签名,密钥须为 PKCS#8 PEM 格式;--price 必须严格在 0 与 1 之间;仅 open 状态市场可交易;API 有速率限制,遇 429 需退避重试;403 通常表示 KYC 或地区限制。其他功能、收费与价格信息暂未提供。