← 返回 Skills 市场
brs999

Kalshi Paper Trading

作者 Ben · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
307
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install kalshi-paper-trading
功能描述
Kalshi-native paper trading ledger and CLI for binary prediction contracts. Use for paper opens, marks, reconciliation, valuation, and review without relying...
使用说明 (SKILL.md)

Kalshi Paper Trading

Use this skill for Kalshi paper execution and ledger management.

Kalshi-native paper trading should use a dedicated ledger and CLI rather than the generic paper-trading skill.

When to Use

Use this skill when the user wants to:

  • design or build a Kalshi-specific paper trader
  • inspect or reconcile Kalshi paper positions
  • store Kalshi prices correctly in cents without mixing units
  • compute Kalshi realized and unrealized PnL
  • add Kalshi-native exposure or risk rules

Key Rule

Do not route Kalshi paper executions through the generic skills/paper-trading ledger unless the user explicitly asks to keep that compatibility.

Default assumptions for this skill:

  • Kalshi execution prices are stored as integer cents in [0, 100]
  • settlement is 100 or 0 cents
  • positions are keyed by market_ticker + contract_side
  • risk controls are based on premium and event exposure, not stop-distance percent risk
  • live market sync supports both legacy cent fields and modern Kalshi *_dollars quote fields

Primary Commands

Initialize the paper account:

node --experimental-strip-types {baseDir}/scripts/kalshi_paper.ts init --account kalshi --starting-balance-usd 1000

Check status:

node --experimental-strip-types {baseDir}/scripts/kalshi_paper.ts status --account kalshi --format json --pretty

Sync a live market quote into the ledger:

node --experimental-strip-types {baseDir}/scripts/kalshi_paper.ts sync-market --market \x3CTICKER> --format json --pretty

Open a paper trade from the live Kalshi ask:

node --experimental-strip-types {baseDir}/scripts/kalshi_paper.ts buy-from-market --account kalshi --market \x3CTICKER> --side YES --contracts 1 --format json --pretty

Reconcile a finalized market:

node --experimental-strip-types {baseDir}/scripts/kalshi_paper.ts reconcile --account kalshi --market \x3CTICKER> --winning-side YES

Review account performance:

node --experimental-strip-types {baseDir}/scripts/kalshi_paper.ts review --account kalshi --format json --pretty

Integration

Pair this skill with a separate Kalshi API read skill for:

  • market discovery
  • liquidity validation
  • trades and orderbook checks
  • pre-trade candidate ranking

This skill owns the paper ledger and execution side only.

Design Reference

Read the proposal before making structural changes:

Use that document for:

  • schema design
  • command surface
  • valuation rules
  • settlement logic
  • migration plan away from the generic paper trader

Tests

Run the Kalshi paper-trader test file:

node --test {baseDir}/tests/kalshi_paper.test.mjs
安全使用建议
This skill appears to do what it says: a local Kalshi-native paper trading CLI that reads public Kalshi market endpoints and stores a local SQLite ledger. Before installing/running: 1) be aware it will create a persistent DB in your home directory (~/.openclaw/kalshi-paper.db by default); back it up or change the --db path if you want it elsewhere. 2) If you expect the skill to call authenticated Kalshi endpoints, note there is no API-key handling — the CLI only performs unauthenticated GETs against the configured KALSHI_BASE_URL. 3) The SKILL metadata doesn't list the optional KALSHI_BASE_URL env var but the code honors it (used in tests to point at local servers). 4) Confirm your runtime has the required Node environment and the necessary sqlite bindings available for DatabaseSync. If any of these points are surprising, review the included scripts before use.
功能分析
Type: OpenClaw Skill Name: kalshi-paper-trading Version: 1.0.0 The skill bundle provides a specialized paper trading ledger for Kalshi binary contracts, using a local SQLite database (~/.openclaw/kalshi-paper.db) to manage positions. The implementation in scripts/kalshi_paper.ts is professional and secure, utilizing prepared statements for database queries and proper URI encoding for API requests to the Kalshi platform. There is no evidence of data exfiltration, unauthorized network activity, or malicious instructions in the SKILL.md file; the code strictly performs the ledger and valuation functions described in the documentation.
能力评估
Purpose & Capability
Name, description, and code align: the scripts implement a Kalshi-native paper ledger and CLI (init, buy, sell, mark, sync-market, reconcile, status, review). Required binary is only node, which is reasonable for a TypeScript/Node CLI. No unrelated credentials or unrelated binaries are requested.
Instruction Scope
The SKILL.md commands and the included scripts stay within the stated scope (local ledger operations and optional Kalshi market reads). The runtime code performs network GETs against a Kalshi OpenAPI base URL (default https://api.elections.kalshi.com/trade-api/v2) and writes a persistent SQLite DB under the user home (~/.openclaw/kalshi-paper.db by default). This persistent file creation is expected for a ledger but is worth noting to users who may not expect on-disk state.
Install Mechanism
No install spec is provided (instruction-only install), which is low risk. The skill includes code files that require node to run. There is no remote download or arbitrary installer; nothing in the manifest fetches external code during install.
Credentials
The skill declares no required environment variables, and it does not request credentials. The code does, however, read an optional KALSHI_BASE_URL environment variable (or accepts a --kalshi-base-url arg) to override the API base — this env var is not listed in the metadata but is innocuous and used to point the CLI at a different Kalshi API endpoint (tests use it to point at a local server). There are no requests for unrelated secrets (AWS keys, tokens, etc.).
Persistence & Privilege
The skill creates and persists a SQLite DB file under the user's home (~/.openclaw/kalshi-paper.db by default). always is false and the skill does not modify other skills or system-wide settings. The persistent ledger is expected for this functionality but users should be aware of the on-disk artifact.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kalshi-paper-trading
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kalshi-paper-trading 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Kalshi-native paper trading ledger and CLI. - Enables paper opens, closing, reconciliation, valuation, and review for Kalshi binary prediction contracts. - Uses integer cents for price and settlement to match Kalshi conventions. - Positions are tracked by `market_ticker + contract_side`; supports Kalshi-native risk/exposure rules. - Integrates with a separate Kalshi API read skill for quotes and market discovery. - Includes sample CLI commands for initializing accounts, trading, syncing quotes, reconciling, and reviewing performance.
元数据
Slug kalshi-paper-trading
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Kalshi Paper Trading 是什么?

Kalshi-native paper trading ledger and CLI for binary prediction contracts. Use for paper opens, marks, reconciliation, valuation, and review without relying... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 307 次。

如何安装 Kalshi Paper Trading?

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

Kalshi Paper Trading 是免费的吗?

是的,Kalshi Paper Trading 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Kalshi Paper Trading 支持哪些平台?

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

谁开发了 Kalshi Paper Trading?

由 Ben(@brs999)开发并维护,当前版本 v1.0.0。

💬 留言讨论