agentleFS
oidsdevoidsdev/honeypot/skills/kalshi/SKILL.md

kalshi

Skill0 starsChanged 21 days agoMITView on GitHub

Trade Kalshi prediction markets via the official REST API: discover events and markets, read orderbooks, check balance and positions, place and cancel orders. Use when the user wants Kalshi trading, market prices, or portfolio status.

  • Reads credentials

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No bundled CLI — call the official REST API directly with any HTTP client (e.g.

    line 12
  2. Distinctive:

    Prices are in cents, 1–99: Every contract pays $1.00 if correct, $0 if wrong (e.g.

    line 45
  3. Distinctive:

    Prefer the demo exchange for dry runs unless the user explicitly wants production.

    line 47
  4. Distinctive:

    Always compute and state total cost and max payout: cost = count × price cents.

    line 48
  5. Very specific:

    Verify a position exists (via positions) before selling.

    line 49

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kalshi

Purpose

Manage Kalshi event-contract trades: discover markets, inspect orderbooks, view portfolio, place and cancel orders.

Tooling

No bundled CLI — call the official REST API directly with any HTTP client (e.g. curl). Public endpoints need no auth; portfolio endpoints need the three KALSHI-ACCESS-* headers from the Auth section below.

BASE=https://api.elections.kalshi.com/trade-api/v2

curl -s "$BASE/exchange/status"                          # exchange status (public)
curl -s "$BASE/events?limit=10"                          # open events (public)
curl -s "$BASE/markets?series_ticker=KXGDPYEAR&limit=10" # markets (public)
curl -s "$BASE/markets/KXGDPYEAR-26/orderbook?depth=5"    # orderbook (public)

Authenticated calls: GET $BASE/portfolio/balance, GET $BASE/portfolio/positions, GET $BASE/portfolio/orders, POST $BASE/portfolio/events/orders to place, DELETE $BASE/portfolio/events/orders/{order_id} to cancel. Swap the base for https://demo-api.kalshi.co/trade-api/v2 for dry runs.

Auth

Credentials come from environment variables at runtime — never hardcoded, never written to files, logs, or memory.

  • KALSHI_API_KEY_ID — API key UUID, from Kalshi Settings > API
  • KALSHI_PRIVATE_KEY_PEM — RSA private key PEM contents (shown only once at key creation), or KALSHI_PRIVATE_KEY_PATH for a PEM file path
  • KALSHI_ENV — demo | production (default production)
  • KALSHI_BASE_URL — optional override

Authenticated requests sign timestamp + METHOD + path (no delimiters, path without the query string) with RSA-PSS-SHA256, sent as three headers: KALSHI-ACCESS-KEY (key UUID), KALSHI-ACCESS-TIMESTAMP (current POSIX time in milliseconds), KALSHI-ACCESS-SIGNATURE (base64 signature).

Operating Rules

  1. Prices are in cents, 1–99. Every contract pays $1.00 if correct, $0 if wrong (e.g. YES at 65¢ costs $0.65, pays $1.00 on a YES outcome → 35¢ profit).
  2. Before placing any order, present ticker / side (YES|NO) / action (buy|sell) / count / price / total cost (= count × price) and require the user's explicit confirmation. Never skip this, never batch it silently.
  3. Prefer the demo exchange for dry runs unless the user explicitly wants production.
  4. Always compute and state total cost and max payout: cost = count × price cents; max payout = count × $1.00.
  5. Verify a position exists (via positions) before selling.
  6. On 401/403, check that the signature headers were built (sign the path without the query string, and confirm the key was created for the right environment), not just that the key is right.

Also on Honeypot — a free, open index of skills for AI agents: https://honeypot-e6c.pages.dev Image: Indexed on Honeypot

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.