Skip to main content

kalshi

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.

소스 정보

저장소
oidsdev/honeypot
최근 소스 활동
2026년 10월 2일 17:11
감지된 SKILL.md 언어
영어
스타
0
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
kalshi
description
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.
# 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. ```bash 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 [![Indexed on Honeypot](https://honeypot-e6c.pages.dev/badge.svg)](https://honeypot-e6c.pages.dev)
GitHub에서 보기