← 返回 Skills 市场
henrik-openclaw

Kalshi

作者 henrik-openclaw · GitHub ↗ · v1.1.0
cross-platform ⚠ suspicious
2493
总下载
3
收藏
5
当前安装
2
版本数
在 OpenClaw 中安装
/install kalshi
功能描述
Read-only Kalshi prediction market integration. Use for viewing markets, checking portfolio positions, analyzing prediction opportunities, and finding high-payoff/high-certainty trades. Triggers on Kalshi, prediction markets, event contracts, or trading recommendations.
使用说明 (SKILL.md)

Kalshi Prediction Markets

Read-only integration with Kalshi's prediction market API.

Capabilities

  • Browse markets: List active events and markets by category
  • Market analysis: Get prices, volumes, orderbook depth
  • Portfolio view: Check positions and P&L (requires API key)
  • Trade recommendations: Find high-certainty, high-payoff opportunities

Setup

Install dependencies:

pip install requests cryptography

For portfolio access (RSA key signing required):

  1. Go to kalshi.com/account/profile
  2. Create new API key → save the Key ID and download the private key
  3. Store credentials:
mkdir -p ~/.kalshi
mv ~/Downloads/your-key-file.txt ~/.kalshi/private_key.pem
chmod 600 ~/.kalshi/private_key.pem
  1. Create ~/.kalshi/credentials.json:
{
  "api_key_id": "your-key-id-here",
  "private_key_path": "~/.kalshi/private_key.pem"
}

Or run interactive setup:

python scripts/kalshi_portfolio.py setup

Scripts

Market Data (No Auth Required)

# List trending markets
python scripts/kalshi_markets.py trending

# Search markets by query
python scripts/kalshi_markets.py search "bitcoin"

# Get specific market details
python scripts/kalshi_markets.py market TICKER

# Find high-value opportunities
python scripts/kalshi_markets.py opportunities

Portfolio (Auth Required)

# View positions
python scripts/kalshi_portfolio.py positions

# View balance
python scripts/kalshi_portfolio.py balance

# Trade history
python scripts/kalshi_portfolio.py history

Opportunity Analysis

The opportunities command identifies markets where:

  • High certainty: Price ≥85¢ YES or ≤15¢ YES (implies 85%+ confidence)
  • Meaningful payoff: Potential return ≥10% on capital
  • Sufficient liquidity: Orderbook depth supports reasonable position size

Formula: expected_value = probability * payoff - (1 - probability) * cost

A good opportunity has: EV / cost > 0.1 (10%+ expected return)

Categories

Kalshi markets span:

  • Politics & Elections
  • Economics (Fed rates, inflation, GDP)
  • Weather & Climate
  • Finance (stock prices, crypto)
  • Entertainment & Sports
  • Science & Tech

API Reference

See references/api.md for endpoint details.

Important Notes

  • This skill is READ-ONLY — no trade execution
  • Public endpoints don't require authentication
  • Portfolio/balance requires API credentials
  • Markets settle in cents (100¢ = $1)
  • All times in UTC
安全使用建议
This skill appears to implement a legitimate read-only Kalshi integration, but there are several mismatches you should consider before installing or providing credentials: - The package metadata declares no config paths or credentials, yet SKILL.md and the included scripts expect a credentials file and an RSA private key under ~/.kalshi. If you use the portfolio features you must place a private key on your machine — treat that key as highly sensitive. Only provide it if you fully trust the skill author and code. - SKILL.md tells you to pip install requests and cryptography but does NOT mention the kalshi-python SDK that the portfolio script imports. Before running, pip install kalshi-python (or inspect that package) so the code runs as intended. - The code talks to https://api.elections.kalshi.com/trade-api/v2 (a non-standard subdomain). If you are concerned, verify that this is an official Kalshi endpoint (compare with official docs) before providing credentials. - The skill is instruction-only with two Python scripts included. If you lack high trust in the publisher, run the scripts in a sandbox or inspect the code yourself (or have someone you trust review it) before saving any private key into ~/.kalshi. Consider running only the market-data commands (which use public endpoints) and avoid running the interactive setup or portfolio commands unless you need portfolio data and trust the code. What would increase confidence: the skill metadata declaring the ~/.kalshi config path and required dependency (kalshi-python), a verified homepage/source, and confirmations that the kalshi-python SDK used is the official package.
功能分析
Type: OpenClaw Skill Name: kalshi Version: 1.1.0 The skill bundle provides read-only integration with the Kalshi prediction market API. It uses standard Python libraries and the official Kalshi SDK, making network calls exclusively to the legitimate Kalshi API. While it handles sensitive API credentials (key ID and private key) for portfolio access, these are stored locally in the user's home directory with appropriate secure permissions (0o600) and are not exfiltrated or misused. The `SKILL.md` documentation is transparent about its read-only nature and credential requirements, and there is no evidence of prompt injection attempts, malicious execution, or unauthorized actions beyond the stated purpose.
能力评估
Purpose & Capability
Name/description describe a read-only Kalshi integration and the code and SKILL.md implement market browsing and portfolio viewing. However the skill metadata declares no required config paths or credentials, while the SKILL.md and scripts explicitly rely on a credentials file and an RSA private key stored under ~/.kalshi. Also SKILL.md lists pip packages (requests, cryptography) but omits the kalshi-python SDK that scripts import and require. These mismatches reduce coherence.
Instruction Scope
SKILL.md instructs the user to download and store an RSA private key and create ~/.kalshi/credentials.json, and the portfolio script will read that private key and credential file. That behavior is explained and limited to Kalshi API usage (no unrelated files or network destinations). But SKILL.md doesn't declare the ~/.kalshi config path in the metadata and omits the explicit kalshi-python dependency; the interactive setup writes credentials.json and tests the account (network call). The instructions do not attempt to read other system files, but they do create and read a sensitive local private key, which must be highlighted.
Install Mechanism
There is no formal install spec (instruction-only). SKILL.md asks the user to pip install requests and cryptography; the actual scripts require requests and the kalshi-python SDK (the latter is not listed). No downloads from arbitrary URLs or extract operations are present. Overall install risk is low-to-moderate, but the missing declaration of the kalshi-python dependency is an oversight that could confuse users.
Credentials
Registry metadata claims no required env vars / config paths, yet the skill expects and reads ~/.kalshi/credentials.json and a private key file (~/.kalshi/private_key.pem). The portfolio functionality requires an RSA private key (sensitive secret). Requesting/storing a private key is proportional to the portfolio feature, but the metadata should have reflected that; the discrepancy is a red flag. No unrelated credentials are requested, and network calls appear limited to the Kalshi API host.
Persistence & Privilege
The skill does not request always:true or any elevated platform privileges. It writes only its own credentials file during interactive setup (~/.kalshi/credentials.json) and sets restrictive file permissions. It does not attempt to modify other skills or system-wide agent settings. Autonomous invocation is enabled (platform default) but not combined here with other high-risk flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kalshi
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kalshi 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Kalshi skill 1.1.0 improves setup instructions for portfolio access. - Updated setup guide to use direct Kalshi API key and private key from kalshi.com - Now documents installing required Python packages: requests and cryptography - Portfolio authentication section rewritten for clarity, including credentials file location and permissions - Added instructions for interactive setup via script for user convenience - General setup is more streamlined and beginner-friendly
v1.0.0
Kalshi skill version 1.0.0 – initial release with read-only market access and integrated portfolio viewing. - Browse and search active Kalshi prediction markets by category. - View detailed market data, including prices, volumes, and orderbook depth. - Analyze prediction opportunities for high-certainty and high-payoff trades. - Check portfolio positions, balances, and trade history (requires API credentials). - Public functions require no authentication; portfolio features need user API key.
元数据
Slug kalshi
版本 1.1.0
许可证
累计安装 5
当前安装数 5
历史版本数 2
常见问题

Kalshi 是什么?

Read-only Kalshi prediction market integration. Use for viewing markets, checking portfolio positions, analyzing prediction opportunities, and finding high-payoff/high-certainty trades. Triggers on Kalshi, prediction markets, event contracts, or trading recommendations. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2493 次。

如何安装 Kalshi?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kalshi」即可一键安装,无需额外配置。

Kalshi 是免费的吗?

是的,Kalshi 完全免费(开源免费),可自由下载、安装和使用。

Kalshi 支持哪些平台?

Kalshi 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kalshi?

由 henrik-openclaw(@henrik-openclaw)开发并维护,当前版本 v1.1.0。

💬 留言讨论