# Prediction Market Arbitrage Zh

> 通过 AIsa API 发现 Polymarket 和 Kalshi 预测市场的套利机会。扫描体育市场跨平台价差、比较实时赔率、验证订单簿流动性。适用场景：预测市场套利、跨平台价差、体育博彩套利、赔率对比、无风险利润、市场低效。 Use when: the user needs market data, stock analysis, watchlists, or portfolio workflows.

- **Type:** Skill
- **Install:** `agentstack add skill-aisa-team-agent-skills-prediction-market-arbitrage-zh`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AIsa-team](https://agentstack.voostack.com/s/aisa-team)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [AIsa-team](https://github.com/AIsa-team)
- **Source:** https://github.com/AIsa-team/agent-skills/tree/main/prediction-market-arbitrage-zh

## Install

```sh
agentstack add skill-aisa-team-agent-skills-prediction-market-arbitrage-zh
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 预测市场套利

通过 [AIsa API](https://aisa.one) 发现 [Polymarket](https://polymarket.com) 和 [Kalshi](https://kalshi.com) 之间的套利机会。

## 配置

```bash
export AISA_API_KEY="your-key"
```

在 [aisa.one](https://aisa.one) 获取 Key（$0.01/次查询，按量付费）。

## 工作流程

发现套利机会的步骤：

1. **扫描匹配市场**（`scan` 批量扫描，`match` 分析特定市场）
2. **查看价差** — 工具自动计算跨平台价格差异
3. **验证流动性** — 用 `prediction_market_client.py orderbooks` 检查订单簿深度后再行动

## 快速示例

### 扫描某项运动的套利机会

```bash
# 扫描指定日期所有 NBA 市场 — 自动显示价差
python3 scripts/arbitrage_finder.py scan nba --date 2025-04-01
```

### 分析特定市场

```bash
# 通过 Polymarket slug
python3 scripts/arbitrage_finder.py match --polymarket-slug 

# 通过 Kalshi ticker
python3 scripts/arbitrage_finder.py match --kalshi-ticker 
```

### 行动前验证流动性

```bash
# 检查两边的订单簿深度
python3 scripts/prediction_market_client.py polymarket orderbooks --token-id 
python3 scripts/prediction_market_client.py kalshi orderbooks --ticker 
```

## 命令参考

### arbitrage_finder.py — 自动检测

```bash
python3 scripts/arbitrage_finder.py scan  --date  [--min-spread ] [--min-liquidity ] [--json]
python3 scripts/arbitrage_finder.py match --polymarket-slug  [--min-spread ] [--min-liquidity ] [--json]
python3 scripts/arbitrage_finder.py match --kalshi-ticker  [--min-spread ] [--min-liquidity ] [--json]
```

支持：`nba`、`nfl`、`mlb`、`nhl`、`soccer`、`tennis`。

### prediction_market_client.py — 原始市场数据

用于手动价格检查和深入分析。

```bash
# 搜索市场
python3 scripts/prediction_market_client.py polymarket markets --search  --status open --limit 5
python3 scripts/prediction_market_client.py kalshi markets --search  --status open --limit 5

# 获取价格（使用 markets 输出中的 token_id / market_ticker）
python3 scripts/prediction_market_client.py polymarket price 
python3 scripts/prediction_market_client.py kalshi price 

# 跨平台体育市场匹配
python3 scripts/prediction_market_client.py sports by-date  --date 
python3 scripts/prediction_market_client.py sports matching (--polymarket-slug  | --kalshi-ticker )

# 订单簿深度
python3 scripts/prediction_market_client.py polymarket orderbooks --token-id 
python3 scripts/prediction_market_client.py kalshi orderbooks --ticker 
```

## 理解套利

当不同平台上所有互斥结果的合计成本低于 `1.0` 时，套利机会存在：

> Polymarket 上 "Yes" 价格 `0.40` + Kalshi 上 "No" 价格 `0.55` = 成本 `0.95`，保证回报 `1.00` → 5.3% 利润。

务必验证订单簿深度 — 没有流动性的价差无法执行。

## 安全与权限

**需要：** `AISA_API_KEY` 环境变量。

所有操作均为**只读**，通过 HTTPS GET 请求 `api.aisa.one`。套利价差在本地计算。不执行交易、不连接钱包、除 API Key 外不发送个人数据。每个响应包含 `usage.cost` 和 `usage.credits_remaining`。

完整文档：[AIsa API 参考](https://docs.aisa.one/reference/)。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AIsa-team](https://github.com/AIsa-team)
- **Source:** [AIsa-team/agent-skills](https://github.com/AIsa-team/agent-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-aisa-team-agent-skills-prediction-market-arbitrage-zh
- Seller: https://agentstack.voostack.com/s/aisa-team
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
