ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

prediction-market-data-zh

通过 AIsa API 查询跨平台预测市场数据。支持 Polymarket 和 Kalshi 的市场行情、价格、订单簿、K线、持仓和交易记录。适用场景:查询预测市场赔率、选举博彩、事件概率、市场情绪、Polymarket 价格、Kalshi 价格、体育博彩赔率、钱包盈亏、跨平台市场对比。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bibaofeng/prediction-market-data-zh
Or

预测市场数据

通过 AIsa API 查询 PolymarketKalshi 预测市场。

配置

export AISA_API_KEY="your-key"

aisa.one 获取 Key($0.01/次查询,按量付费)。

工作流程

查询预测市场数据的步骤:

  1. 搜索市场获取 ID(必须从这一步开始)
  2. 从返回结果中提取 IDtoken_idcondition_idmarket_ticker
  3. 用 ID 查询详情(价格、订单簿、K线等)

快速示例

Polymarket:搜索 → 获取价格

# 第一步:搜索市场,提取 token_id(side_a.id 或 side_b.id)
python3 {baseDir}/scripts/prediction_market_client.py polymarket markets --search "election" --status open --limit 5

# 第二步:用第一步的 token_id 获取价格
python3 {baseDir}/scripts/prediction_market_client.py polymarket price <token_id>

Kalshi:搜索 → 获取价格

# 第一步:搜索市场,提取 market_ticker
python3 {baseDir}/scripts/prediction_market_client.py kalshi markets --search "fed rate" --status open --limit 5

# 第二步:用第一步的 market_ticker 获取价格
python3 {baseDir}/scripts/prediction_market_client.py kalshi price <market_ticker>

跨平台体育市场

python3 {baseDir}/scripts/prediction_market_client.py sports by-date nba --date 2025-04-01

ID 参考

大多数命令需要从 markets 返回中获取 ID,务必先搜索。

平台ID 字段获取位置
Polymarkettoken_idmarkets 输出中的 side_a.idside_b.id
Polymarketcondition_idmarkets 输出中的 condition_id
Kalshimarket_tickermarkets 输出中的 market_ticker

命令参考

Polymarket

python3 {baseDir}/scripts/prediction_market_client.py polymarket markets [--search <关键词>] [--status open|closed] [--min-volume <数值>] [--limit <数值>]
python3 {baseDir}/scripts/prediction_market_client.py polymarket price <token_id> [--at-time <unix时间戳>]
python3 {baseDir}/scripts/prediction_market_client.py polymarket activity --user <钱包地址> [--market-slug <slug>] [--limit <数值>]
python3 {baseDir}/scripts/prediction_market_client.py polymarket orders [--market-slug <slug>] [--token-id <id>] [--user <钱包地址>] [--limit <数值>]
python3 {baseDir}/scripts/prediction_market_client.py polymarket orderbooks --token-id <id> [--start <毫秒>] [--end <毫秒>] [--limit <数值>]
python3 {baseDir}/scripts/prediction_market_client.py polymarket candlesticks <condition_id> --start <unix时间戳> --end <unix时间戳> [--interval 1|60|1440]
python3 {baseDir}/scripts/prediction_market_client.py polymarket positions <钱包地址> [--limit <数值>]
python3 {baseDir}/scripts/prediction_market_client.py polymarket wallet (--eoa <地址> | --proxy <地址>) [--with-metrics]
python3 {baseDir}/scripts/prediction_market_client.py polymarket pnl <钱包地址> --granularity <day|week|month>

Kalshi

Metadata

Author@bibaofeng
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bibaofeng-prediction-market-data-zh": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.