Probtrade Bot:利用 Openclaw Skills 实现 Polymarket 自动交易
作者:互联网
2026-04-05
什么是 probtrade-bot?
probtrade-bot 是一款专为希望在 Polymarket 上执行基于逻辑的策略而无需人工干预的交易者设计的精密自动化引擎。通过利用 Openclaw Skills 的强大功能,该机器人直接与 prob.trade API 集成,以执行实时市场分析和订单执行。
该工具在构建时注重可扩展性和安全性,具有强大的模拟运行(dry-run)模式,允许开发人员在投入资金前模拟交易行为。无论您是运行内置的套利逻辑还是开发自己的专利算法,该机器人都能提供在预测市场中保持竞争优势所需的基础设施。
下载入口:https://github.com/openclaw/skills/tree/main/skills/vlprosvirkin/openclaw-bot-prob-trade
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install openclaw-bot-prob-trade
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 openclaw-bot-prob-trade。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
probtrade-bot 应用场景
- 自动化 Polymarket 上 YES 和 NO 合约之间的套利机会,以锁定保障利润。
- 执行基于动量的策略,在 24 小时市场大幅波动后对价格回归进行投柱。
- 通过开发者友好的 CLI 坚控投资组合状态,包括余额和持仓情况。
- 使用 Openclaw Skills 提供的内置模拟运行功能,在无风险环境中测试自定义交易逻辑。
- 机器人验证 Python 3 的安装及所需的 probtrade skill,以确保 API 连接性。
- 从配置文件中加载用户定义的参数,包括风险限制和激活的交易策略。
- 启动市场扫描,通过与 Openclaw Skills 的集成从 Polymarket 获取实时数据。
- 所选策略分析市场数据,以识别符合特定入场和离场标准的信号。
- 如果信号有效且通过了所有风险管理检查,机器人将通过 API 下单,如果处于模拟模式则记录该操作。
probtrade-bot 配置指南
开始之前,请确保已安装 Python 3 和先决依赖项。按照以下步骤初始化机器人:
- 使用您的 API 密钥安装并配置
probtradeskill。 - 编辑根目录中的
config.yaml文件,设置您的风险限制和策略。 - 运行测试扫描以验证设置:
python3 scripts/bot.py scan
- 启动自主交易循环:
python3 scripts/bot.py run
probtrade-bot 数据架构与分类体系
probtrade-bot 通过结构化格式组织其操作和数据输出,以确保与其他 Openclaw Skills 的兼容性。
| 组件 | 格式 | 描述 |
|---|---|---|
| 配置 | YAML | 定义策略、风险限制(最大支出、回撤)和操作模式。 |
| 市场信号 | JSON | 包含条件 ID、价格目标和置信水平的结构化数据。 |
| 风险状态 | JSON | 追踪当前每日支出、连续亏损和未平仓头寸数量。 |
| 策略文件 | Python | 位于 strategies 目录下的可插拔类,用于自定义逻辑。 |
name: probtrade-bot
version: 1.0.0
description: "Autonomous trading bot for Polymarket via prob.trade. Run strategies, manage risk, scan markets. Requires the probtrade skill for API access."
homepage: https://github.com/vlprosvirkin/openclaw-bot-prob-trade
user-invocable: true
metadata: {"openclaw":{"requires":{"bins":["python3"],"skills":["probtrade"]},"emoji":"??","install":[{"id":"python3","kind":"brew","formula":"python@3","bins":["python3"],"label":"Install Python 3","os":["darwin","linux"]}]}}
probtrade-bot — Autonomous Polymarket Trading Bot
Autonomous trading bot that uses the probtrade skill to trade on Polymarket via prob.trade. Includes built-in risk management, pluggable strategies, and dry-run mode.
Requires: The probtrade skill must be installed and configured with API keys.
Setup
- Install and configure the
probtradeskill first (API key required) - Edit
{baseDir}/config.yamlto set your strategy and risk limits - By default,
dry_run: true— the bot will only log, not trade
Commands
Run Bot
Start the autonomous trading loop. Scans markets and places orders every cycle.
python3 {baseDir}/scripts/bot.py run
Override strategy:
python3 {baseDir}/scripts/bot.py run --strategy pair_arb
Scan Markets
Run a single scan to see what the strategy would do, without placing orders.
python3 {baseDir}/scripts/bot.py scan
Bot Status
Check balance, positions, open orders, and risk state.
python3 {baseDir}/scripts/bot.py status
List Strategies
See all available strategies.
python3 {baseDir}/scripts/bot.py strategies
Built-in Strategies
- momentum — Contrarian momentum / mean reversion. Buys markets where YES price dropped significantly in 24h, betting on reversion.
- pair_arb — Async pair cost arbitrage. Finds markets where YES + NO price < $0.95, buys the cheaper side for guaranteed profit on resolution.
Creating Your Own Strategy
- Create a file in
{baseDir}/lib/strategies/(e.g.my_strategy.py) - Implement a class that extends
Strategy:
from lib.strategy_base import Strategy, Signal, get_yes_price, get_price_change
class MyStrategy(Strategy):
name = "my_strategy"
def initialize(self, config):
self.threshold = config.get("my_param", 0.15)
def scan(self, markets, positions, balance):
signals = []
for m in markets:
if should_buy(m):
signals.append(Signal(
market=m["condition_id"],
side="BUY", outcome="Yes",
order_type="LIMIT", amount=5,
price=get_yes_price(m),
confidence=0.8,
reason="My reason"
))
return signals
- Set
strategy: my_strategyinconfig.yaml - Test:
python3 {baseDir}/scripts/bot.py scan --strategy my_strategy
Risk Management
The bot enforces risk limits defined in config.yaml:
- max_position_size: Maximum USDC per single order
- max_daily_spend: Total USDC allowed per day
- max_open_positions: Maximum concurrent positions
- max_drawdown_pct: Circuit breaker — halts all trading if portfolio drops by this %
- max_consecutive_losses: Circuit breaker trigger after N losses in a row
Environment Variables
Override config values via env vars:
DRY_RUN=true— force dry run modeSTRATEGY=pair_arb— override strategyLOOP_INTERVAL=60— override scan intervalPROBTRADE_SKILL_PATH=/path/to/probtrade/lib— custom path to probtrade skill lib
Output
All commands output structured data (JSON or formatted text) for easy parsing by AI agents.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
HealthClaw 牙科:AI 驱动的牙科诊所管理 - Openclaw Skills
ERPClaw 销售:AI 订单到现金全生命周期管理 - Openclaw Skills
ERPClaw 欧盟区域合规:增值税、OSS 和电子发票 - Openclaw Skills
ERPClaw 人事:AI 人力资源与美国薪酬管理 - Openclaw Skills
erpclaw-journals:安全且AI原生的簿记系统 - Openclaw Skills
ERPClaw Growth:AI CRM 与业务分析 - Openclaw Skills
ERPClaw Billing:基于用量与计量的计费 - Openclaw Skills
educlaw: AI 原生教育与 SIS 管理 - Openclaw Skills
EduClaw K-12 扩展组件:学生管理与合规 - Openclaw Skills
AuditClaw AWS:自动化 AWS 合规证据收集 - Openclaw Skills
AI精选
