pp-kalshi
Original:🇺🇸 English
Translated
Trade prediction markets, persist tick data, and answer category-level P&L questions Kalshi.com cannot. Trigger phrases: `kalshi market price`, `track prediction market`, `kalshi portfolio P&L`, `kalshi correlate markets`, `use kalshi`, `run kalshi`.
4installs
Added on
NPX Install
npx skill4agent add mvanhorn/printing-press-library pp-kalshiTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Kalshi — Printing Press CLI
Prerequisites: Install the CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
kalshi-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install kalshi --cli-only - Verify:
kalshi-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
npxbash
go install github.com/mvanhorn/printing-press-library/library/payments/kalshi/cmd/kalshi-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATHWhen to Use This CLI
Reach for kalshi-pp-cli when an agent needs price-over-time or category-level analytics on Kalshi markets — the public API only returns current prices and flat positions, so historical and aggregated questions require the local snapshot store. Use it for daily portfolio reconciliation, signal discovery via correlation across markets, and safe scripting against read-only API credentials.
Unique Capabilities
These capabilities aren't available in any other tool for this API.
- — See your P&L broken down by market category and series over any time period
portfolio attribution - — Track how market odds moved over time with price progression charts
markets history - — Calculate your win/loss ratio, expected value, and ROI across all settled positions
portfolio winrate - — See upcoming settlements with your positions, expected payouts, and category breakdown
portfolio calendar - — Find markets with the biggest price swings since your last sync
markets movers - — Compare price histories of two markets to discover correlated events
markets correlate - — See your total risk broken down by category, with concentration warnings
portfolio exposure - — Find positions in markets approaching expiry where you haven't acted recently
portfolio stale
Command Reference
account — Manage account
- — Endpoint to retrieve the API tier limits associated with the authenticated user.
kalshi-pp-cli account get-api-limits - — Lists API v2 endpoints whose configured token cost differs from the default cost. Endpoints that use the default...
kalshi-pp-cli account get-endpoint-costs
api-keys — API key management endpoints
- — Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or...
kalshi-pp-cli api-keys create - — Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can...
kalshi-pp-cli api-keys delete - — Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public...
kalshi-pp-cli api-keys generate - — Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to...
kalshi-pp-cli api-keys get
communications — Request-for-quote (RFQ) endpoints
- — Endpoint for accepting a quote. This will require the quoter to confirm
kalshi-pp-cli communications accept-quote - — Endpoint for confirming a quote. This will start a timer for order execution
kalshi-pp-cli communications confirm-quote - — Endpoint for creating a quote in response to an RFQ
kalshi-pp-cli communications create-quote - — Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time.
kalshi-pp-cli communications create-rfq - — Endpoint for deleting a quote, which means it can no longer be accepted.
kalshi-pp-cli communications delete-quote - — Endpoint for deleting an RFQ by ID
kalshi-pp-cli communications delete-rfq - — Endpoint for getting the communications ID of the logged-in user.
kalshi-pp-cli communications get-id - — Endpoint for getting a particular quote
kalshi-pp-cli communications get-quote - — Endpoint for getting quotes
kalshi-pp-cli communications get-quotes - — Endpoint for getting a single RFQ by id
kalshi-pp-cli communications get-rfq - — Endpoint for getting RFQs
kalshi-pp-cli communications get-rfqs
events — Event endpoints
- — Get all events. This endpoint excludes multivariate events. To retrieve multivariate events, use the GET...
kalshi-pp-cli events get - — Endpoint for getting data about an event by its ticker. An event represents a real-world occurrence that can be...
kalshi-pp-cli events get-eventticker - — Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections....
kalshi-pp-cli events get-multivariate
exchange — Exchange status and information endpoints
- — Endpoint for getting all exchange-wide announcements.
kalshi-pp-cli exchange get-announcements - — Endpoint for getting the exchange schedule.
kalshi-pp-cli exchange get-schedule - — Endpoint for getting the exchange status.
kalshi-pp-cli exchange get-status - — There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible,...
kalshi-pp-cli exchange get-user-data-timestamp
fcm — FCM member specific endpoints
- — Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and...
kalshi-pp-cli fcm get-fcmorders - — Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access...
kalshi-pp-cli fcm get-fcmpositions
historical — Manage historical
- — Returns the cutoff timestamps that define the boundary between live and historical data. ## Cutoff fields -...
kalshi-pp-cli historical get-cutoff - — Endpoint for getting all historical fills for the member. A fill is when a trade you have is matched.
kalshi-pp-cli historical get-fills - — Endpoint for getting data about a specific market by its ticker from the historical database.
kalshi-pp-cli historical get-market - — Endpoint for fetching historical candlestick data for markets that have been archived from the live data set. Time...
kalshi-pp-cli historical get-market-candlesticks - — Endpoint for getting markets that have been archived to the historical database. Filters are mutually exclusive.
kalshi-pp-cli historical get-markets - — Endpoint for getting orders that have been archived to the historical database.
kalshi-pp-cli historical get-orders - — Endpoint for getting all historical trades for all markets. Trades that were filled before the historical cutoff are...
kalshi-pp-cli historical get-trades
incentive-programs — Incentive program endpoints
- — List incentives with optional filters. Incentives are rewards programs for trading activity on specific markets.
kalshi-pp-cli incentive-programs
kalshi-trade-manual-search — Manage kalshi trade manual search
- — Retrieve available filters organized by sport. This endpoint returns filtering options available for each sport,...
kalshi-pp-cli kalshi-trade-manual-search
kalshi-trade-manual-search-2 — Manage kalshi trade manual search 2
- — Retrieve tags organized by series categories. This endpoint returns a mapping of series categories to their...
kalshi-pp-cli kalshi-trade-manual-search-2
live-data — Live data endpoints
- — Get live data for multiple milestones
kalshi-pp-cli live-data get - — Get live data for a specific milestone.
kalshi-pp-cli live-data get-by-milestone - — Get play-by-play game statistics for a specific milestone. Supported sports: Pro Football, College Football, Pro...
kalshi-pp-cli live-data get-game-stats
markets — Market data endpoints
- — Endpoint for retrieving candlestick data for multiple markets. - Accepts up to 100 market tickers per request -...
kalshi-pp-cli markets batch-get-candlesticks - — Filter by market status. Possible values:
kalshi-pp-cli markets get,unopened,open,closed. Leave empty to return markets...settled - — Endpoint for getting the current order books for multiple markets in a single request. The order book shows all...
kalshi-pp-cli markets get-orderbooks - — Endpoint for getting data about a specific market by its ticker. A market represents a specific binary outcome...
kalshi-pp-cli markets get-ticker - — Endpoint for getting all trades for all markets. A trade represents a completed transaction between two users on a...
kalshi-pp-cli markets get-trades
milestones — Milestone endpoints
- — Minimum start date to filter milestones. Format: RFC3339 timestamp
kalshi-pp-cli milestones get - — Endpoint for getting data about a specific milestone by its ID.
kalshi-pp-cli milestones get-milestoneid
multivariate-event-collections — Manage multivariate event collections
- — Endpoint for creating an individual market in a multivariate event collection. This endpoint must be hit at least...
kalshi-pp-cli multivariate-event-collections create-market-in - — Endpoint for getting data about multivariate event collections.
kalshi-pp-cli multivariate-event-collections get - — Endpoint for getting data about a multivariate event collection by its ticker.
kalshi-pp-cli multivariate-event-collections get-multivariateeventcollections
portfolio — Portfolio and balance information endpoints
- — Endpoint for amending the max number of fillable contracts and/or price in an existing order. Max fillable contracts...
kalshi-pp-cli portfolio amend-order - — Endpoint for amending the price and/or remaining count of an existing event-market order using the V2...
kalshi-pp-cli portfolio amend-order-v2 - — Transfers funds between the authenticated user's subaccounts. Use 0 for the primary account, or 1-32 for numbered...
kalshi-pp-cli portfolio apply-subaccount-transfer - — Endpoint for cancelling a batch of orders. The maximum batch size scales with your tier's write budget — see [Rate...
kalshi-pp-cli portfolio batch-cancel-orders - — Endpoint for cancelling a batch of event-market orders using the V2 response shape. The maximum batch size scales...
kalshi-pp-cli portfolio batch-cancel-orders-v2 - — Endpoint for submitting a batch of orders. The maximum batch size scales with your tier's write budget — see [Rate...
kalshi-pp-cli portfolio batch-create-orders - — Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size...
kalshi-pp-cli portfolio batch-create-orders-v2 - — Endpoint for canceling orders. The value for the orderId should match the id field of the order you want to...
kalshi-pp-cli portfolio cancel-order - — Endpoint for cancelling event-market orders using the V2 response shape. Returns `{order_id, client_order_id,...
kalshi-pp-cli portfolio cancel-order-v2 - — Endpoint for submitting orders in a market. Each user is limited to 200 000 open orders at a time.
kalshi-pp-cli portfolio create-order - — Creates a new order group with a contracts limit measured over a rolling 15-second window. When the limit is hit,...
kalshi-pp-cli portfolio create-order-group - — Endpoint for submitting event-market orders using the V2 request/response shape (single-book
kalshi-pp-cli portfolio create-order-v2/bidside and...ask - — Creates a new subaccount for the authenticated user. Subaccounts are numbered sequentially starting from 1. Maximum...
kalshi-pp-cli portfolio create-subaccount - — Endpoint for decreasing the number of contracts in an existing order. This is the only kind of edit available on...
kalshi-pp-cli portfolio decrease-order - — Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape....
kalshi-pp-cli portfolio decrease-order-v2 - — Deletes an order group and cancels all orders within it. This permanently removes the group.
kalshi-pp-cli portfolio delete-order-group - — Endpoint for getting the balance and portfolio value of a member. Both values are returned in cents.
kalshi-pp-cli portfolio get-balance - — Endpoint for getting all fills for the member. A fill is when a trade you have is matched. Fills that occurred...
kalshi-pp-cli portfolio get-fills - — Endpoint for getting a single order.
kalshi-pp-cli portfolio get-order - — Retrieves details for a single order group including all order IDs and auto-cancel status.
kalshi-pp-cli portfolio get-order-group - — Retrieves all order groups for the authenticated user.
kalshi-pp-cli portfolio get-order-groups - — Endpoint for getting an order's queue position in the order book. This represents the amount of orders that need to...
kalshi-pp-cli portfolio get-order-queue-position - — Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that...
kalshi-pp-cli portfolio get-order-queue-positions - — Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been...
kalshi-pp-cli portfolio get-orders - — Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The...
kalshi-pp-cli portfolio get-positions - — Endpoint for getting the total value, in cents, of resting orders. This endpoint is only intended for use by FCM...
kalshi-pp-cli portfolio get-resting-order-total-value - — Endpoint for getting the member's settlements historical track.
kalshi-pp-cli portfolio get-settlements - — Gets balances for all subaccounts including the primary account.
kalshi-pp-cli portfolio get-subaccount-balances - — Gets the netting enabled settings for all subaccounts.
kalshi-pp-cli portfolio get-subaccount-netting - — Gets a paginated list of all transfers between subaccounts for the authenticated user.
kalshi-pp-cli portfolio get-subaccount-transfers - — Resets the order group's matched contracts counter to zero, allowing new orders to be placed again after the limit...
kalshi-pp-cli portfolio reset-order-group - — Triggers the order group, canceling all orders in the group and preventing new orders until the group is reset.
kalshi-pp-cli portfolio trigger-order-group - — Updates the order group contracts limit (rolling 15-second window). If the updated limit would immediately trigger...
kalshi-pp-cli portfolio update-order-group-limit - — Updates the netting enabled setting for a specific subaccount. Use 0 for the primary account, or 1-32 for numbered...
kalshi-pp-cli portfolio update-subaccount-netting
series — Manage series
- — Endpoint for getting data about a specific series by its ticker. A series represents a template for recurring events...
kalshi-pp-cli series get - — Get Series Fee Changes
kalshi-pp-cli series get-fee-changes - — Endpoint for getting data about multiple series with specified filters. A series represents a template for recurring...
kalshi-pp-cli series get-list
structured-targets — Structured targets endpoints
- — Page size (min: 1, max: 2000)
kalshi-pp-cli structured-targets get - — Endpoint for getting data about a specific structured target by its ID.
kalshi-pp-cli structured-targets get-structuredtargets
Finding the right command
When you know what you want to do but not which command does it, ask the CLI directly:
bash
kalshi-pp-cli which "<capability in your own words>"which02--helpRecipes
Politics-category P&L this quarter
bash
kalshi-pp-cli portfolio attribution --since 2026-01-01 --by category --agent --select 'rows.category,rows.realized_pnl,rows.fills'Realized P&L attributed to Kalshi taxonomy; --select narrows the response to the three fields agents need.
Track the Fed-cut market on a watchlist
bash
kalshi-pp-cli watch add KXFEDFUNDS-26FEB && kalshi-pp-cli watch diff --since 24h --agentAdd ticker to local watchlist, then ask for the per-ticker delta since yesterday.
Correlate inflation and rate-cut markets
bash
kalshi-pp-cli markets correlate KXFEDFUNDS-26FEB KXCPI-26FEB --window 30d --agentPearson r computed locally over snapshot price series for both markets.
Safe paper-trading session
bash
KALSHI_READ_ONLY=1 kalshi-pp-cli portfolio create-order --ticker KXTEST-2026 --side yes --count 1 --yes-price 50 --action buy --dry-runBoth safety floors engaged: client-side read-only lock + dry-run; never reaches the API.
Movers in sports markets, last 24h
bash
kalshi-pp-cli markets movers --window 24h --category sports --limit 5 --agentComputes price deltas from market_price_history snapshots; works offline after a sync.
Auth Setup
Kalshi requires composed RSA-PSS signature auth: a UUID access key id (KALSHI_API_KEY) plus an RSA private key file (KALSHI_PRIVATE_KEY_PATH or KALSHI_PRIVATE_KEY). Kalshi issues two key tiers — read-only and read/write — and the CLI honors KALSHI_READ_ONLY=1 (or --read-only) as a client-side lock that blocks every POST/PUT/PATCH/DELETE before signing, regardless of which tier is loaded. Write commands run against a read-only key will surface a 403 from Kalshi; pair with --dry-run while debugging.
Run to verify setup.
kalshi-pp-cli doctorAgent Mode
Add to any command. Expands to: .
--agent--json --compact --no-input --no-color --yes-
Pipeable — JSON on stdout, errors on stderr
-
Filterable —keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
--selectbashkalshi-pp-cli api-keys get --agent --select id,name,status -
Previewable —shows the request without sending
--dry-run -
Offline-friendly — sync/search commands can use the local SQLite store when available
-
Non-interactive — never prompts, every input is a flag
Response envelope
Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}Parse for data and to know whether it's live or local. A human-readable summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
.results.meta.sourceN results (live)Agent Feedback
When you (or the agent) notice something off about this CLI, record it:
kalshi-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
kalshi-pp-cli feedback --stdin < notes.txt
kalshi-pp-cli feedback list --json --limit 10Entries are stored locally at . They are never POSTed unless is set AND either is passed or . Default behavior is local-only.
~/.kalshi-pp-cli/feedback.jsonlKALSHI_FEEDBACK_ENDPOINT--sendKALSHI_FEEDBACK_AUTO_SEND=trueWrite what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
Output Delivery
Every command accepts . The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
--deliver <sink>| Sink | Effect |
|---|---|
| Default; write to stdout only |
| Atomically write output to |
| POST the output body to the URL ( |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
Named Profiles
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
kalshi-pp-cli profile save briefing --json
kalshi-pp-cli --profile briefing api-keys get
kalshi-pp-cli profile list --json
kalshi-pp-cli profile show briefing
kalshi-pp-cli profile delete briefing --yesExplicit flags always win over profile values; profile values win over defaults. lists all available profiles under so introspecting agents discover them at runtime.
agent-contextavailable_profilesExit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 4 | Authentication required |
| 5 | API error (upstream issue) |
| 7 | Rate limited (wait and retry) |
| 10 | Config error |
Argument Parsing
Parse :
$ARGUMENTS- Empty, , or
help→ show--helpoutputkalshi-pp-cli --help - Starts with → ends with
install→ MCP installation; otherwise → see Prerequisites abovemcp - Anything else → Direct Use (execute as CLI command with )
--agent
MCP Server Installation
- Install the MCP server:
bash
go install github.com/mvanhorn/printing-press-library/library/other/kalshi/cmd/kalshi-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add kalshi-pp-mcp -- kalshi-pp-mcp - Verify:
claude mcp list
Direct Use
- Check if installed: If not found, offer to install (see Prerequisites at the top of this skill).
which kalshi-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashkalshi-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
kalshi-pp-cli <command> --help