← Back to Skills Marketplace
brs999

Kalshi Paper Trading

by Ben · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
307
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install kalshi-paper-trading
Description
Kalshi-native paper trading ledger and CLI for binary prediction contracts. Use for paper opens, marks, reconciliation, valuation, and review without relying...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kalshi-paper-trading
  3. After installation, invoke the skill by name or use /kalshi-paper-trading
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug kalshi-paper-trading
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 307 downloads so far.

How do I install Kalshi Paper Trading?

Run "/install kalshi-paper-trading" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Kalshi Paper Trading free?

Yes, Kalshi Paper Trading is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Kalshi Paper Trading support?

Kalshi Paper Trading is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kalshi Paper Trading?

It is built and maintained by Ben (@brs999); the current version is v1.0.0.

💬 Comments