← 返回
数据分析 Key 中文

Kalshi Trading

Trade on Kalshi prediction markets: check portfolio, search markets, analyze orderbooks, place/cancel orders, and manage binary contract positions.
{"answer":"在Kalshi预测市场交易:查看投资组合、搜索市场、分析订单簿、下单/撤单,以及管理二元合约仓位。"}
ghsmc
数据分析 clawhub v1.0.0 1 版本 99863.4 Key: 需要
★ 7
Stars
📥 2,053
下载
💾 38
安装
1
版本
#latest

概述

Kalshi

Trade on Kalshi prediction markets via a self-contained CLI script. Supports market search, portfolio tracking, and full order lifecycle (place/cancel/monitor).

Quick Start

All commands route through a single script. Output is JSON.

CLI

Primary script:

{baseDir}/scripts/kalshi-cli.mjs <command> [args...]

Helper script:

{baseDir}/scripts/quick-analysis.mjs <ticker>

Combines market details + orderbook in a single call for fast analysis.

Commands

CommandDescription
-----------------------------------------------------------------------------------------
balanceGet account balance (cash + portfolio value)
portfolioGet balance + all open positions
trendingTop markets by 24h volume
search Search markets by keyword
market Get details for a single market
orderbook Get bid/ask levels for a market
`buy no> `Place a buy order (price in cents 1-99)
`sell no> `Place a sell order (price in cents 1-99)
cancel Cancel a resting order
`orders [resting\canceled\executed]`List orders, optionally filtered by status
fills [ticker]List recent fills, optionally filtered by ticker

Examples

# Check balance
{baseDir}/scripts/kalshi-cli.mjs balance

# See what's trending
{baseDir}/scripts/kalshi-cli.mjs trending

# Search for markets about bitcoin
{baseDir}/scripts/kalshi-cli.mjs search "bitcoin"

# Get details on a specific market
{baseDir}/scripts/kalshi-cli.mjs market KXBTCD-26FEB14-B55500

# Check orderbook
{baseDir}/scripts/kalshi-cli.mjs orderbook KXBTCD-26FEB14-B55500

# Buy 5 YES contracts at 65 cents
{baseDir}/scripts/kalshi-cli.mjs buy KXBTCD-26FEB14-B55500 yes 5 65

# Sell 5 YES contracts at 70 cents
{baseDir}/scripts/kalshi-cli.mjs sell KXBTCD-26FEB14-B55500 yes 5 70

# Check open orders
{baseDir}/scripts/kalshi-cli.mjs orders resting

# Check recent fills
{baseDir}/scripts/kalshi-cli.mjs fills

Output

All commands output JSON to stdout. Parse the result to present it to the user.

Trading Rules

Critical: ALWAYS confirm with the user before placing any buy or sell order.

Before executing a trade, show the user:

  • Ticker
  • Side (YES or NO)
  • Count (number of contracts)
  • Price (in cents)
  • Total cost = count × price cents = $X.XX

Price format:

  • Prices are in cents (1-99)
  • 65 cents = $0.65 per contract
  • Minimum: 1 cent, Maximum: 99 cents

Payouts:

  • All contracts pay $1.00 (100 cents) if correct, $0 if wrong
  • YES at 65¢: costs 65¢, pays $1.00 if YES wins → 35¢ profit per contract
  • NO at 35¢: costs 35¢, pays $1.00 if NO wins → 65¢ profit per contract
  • YES price + NO price ≈ 100¢ (spreads cause small deviations)

Before selling: Verify the user holds the position by checking portfolio first

Reference Documentation

Environment Variables

Required:

  • KALSHI_API_KEY_ID — your Kalshi API key UUID
  • KALSHI_PRIVATE_KEY_PATH — absolute path to your RSA private key PEM file

See setup-guide.md for detailed configuration instructions.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 20:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 165 📥 60,092
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,589
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,997