Polymarket api

From aAAaqwq/AGI-Super-Team · View interactive version

Polymarket api is an AI agent skill from the GitHub repository aAAaqwq/AGI-Super-Team. Polymarket交易操作。统一入口scripts/trade.py,slug驱动,零browser纯API。Triggers: 'polymarket交易', 'API下单', 'buy YES', 'sell NO', 'trade', 'price', '仓位'.

How to use this skill

Skill file

Polymarket API Trading Skill

⚠️ 强制使用 scripts/trade.py,禁止直接调用CLOB API。

脚本目录

skills/polymarket-api/scripts/
└── trade.py    # 统一交易入口(买/卖/查价/查仓位)

命令

# === 交易 ===
python3 "$SKILL_DIR/scripts/trade.py" buy <slug> <YES/NO/UP/DOWN> <金额> [--threshold N] [price]
python3 "$SKILL_DIR/scripts/trade.py" sell <slug> <YES/NO> <金额> [--threshold N] [price]

# === 查询 ===
python3 "$SKILL_DIR/scripts/trade.py" price <slug> <YES/NO> [--threshold N]
python3 "$SKILL_DIR/scripts/trade.py" info <slug> [--threshold N]

示例

# BTC>$68k Mar28 买NO $10
python3 "$SKILL_DIR/scripts/trade.py" buy bitcoin-above-on-march-28 NO 10 --threshold 68000

# BTC涨跌盘 买DOWN $8
python3 "$SKILL_DIR/scripts/trade.py" buy btc-up-or-down-on-march-27-2026 DOWN 8

# 查价
python3 "$SKILL_DIR/scripts/trade.py" price ethereum-above-on-april-21 YES --threshold 2300

参数说明

| 参数 | 必填 | 说明 |

|------|------|------|

| slug | ✅ | Gamma slug (e.g. bitcoin-above-on-march-28) |

| side | ✅ | YES/NO/UP/DOWN |

| 金额 | buy必填 / sell可选 | USDC金额,sell默认全部 |

| --threshold N | 多market时 | Above盘阈值,如68000 |

| price | 可选 | 默认自动定价(MID+1¢买/BID-1¢卖) |

Slug格式

| 类型 | 格式 | 示例 |

|------|------|------|

| Above盘 | {coin}-above-on-{month}-{day} | bitcoin-above-on-march-28 |

| 涨跌盘 | {ticker}-up-or-down-on-{month}-{day}-{year} | btc-up-or-down-on-march-27-2026 |

底层SDK(仅脚本内部使用)

V2迁移记录 (2026-05-02)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.