Openclaw Bot Prob Trade — OpenClaw 机器人 Prob Trade
v1.0.1Autonomous trading 机器人 for Polymarket via prob.trade. 运行 strategies, manage risk, 扫描 markets. Requires the probtrade 技能 for API 访问.
运行时依赖
安装命令
点击复制技能文档
probtrade-机器人 — Autonomous Polymarket Trading 机器人
Autonomous trading 机器人 that uses the probtrade 技能 to trade on Polymarket via prob.trade. Includes built-in risk management, pluggable strategies, and dry-运行 mode.
Requires: The probtrade 技能 must be 安装ed and 配置d with API keys.
设置up 安装 and 配置 the probtrade 技能 first (API key required) Edit {baseDir}/config.yaml to 设置 your strategy and risk limits By default, dry_运行: true — the 机器人 will only 记录, not trade Commands 运行 机器人
启动 the autonomous trading loop. 扫描s markets and places orders every cycle.
python3 {baseDir}/scripts/机器人.py 运行
Override strategy:
python3 {baseDir}/scripts/机器人.py 运行 --strategy pAIr_arb
扫描 Markets
运行 a single 扫描 to see what the strategy would do, without placing orders.
python3 {baseDir}/scripts/机器人.py 扫描
机器人 状态
检查 balance, positions, open orders, and risk 状态.
python3 {baseDir}/scripts/机器人.py 状态
列出 Strategies
See all avAIlable strategies.
python3 {baseDir}/scripts/机器人.py strategies
Built-in Strategies momentum — Contrarian momentum / mean reversion. Buys markets where YES price dropped 签名ificantly in 24h, betting on reversion. pAIr_arb — A同步 pAIr cost arbitrage. Finds markets where YES + NO price < $0.95, buys the cheaper side for guaranteed profit on resolution. Creating Your Own Strategy 创建 a file in {baseDir}/lib/strategies/ (e.g. my_strategy.py) Implement a class that extends Strategy: from lib.strategy_base 导入 Strategy, 签名al, 获取_yes_price, 获取_price_change
class MyStrategy(Strategy): name = "my_strategy"
def 初始化(self, config): self.threshold = config.获取("my_param", 0.15)
def 扫描(self, markets, positions, balance): 签名als = [] for m in markets: if should_buy(m): 签名als.应用end(签名al( market=m["condition_id"], side="BUY", outcome="Yes", order_type="LIMIT", amount=5, price=获取_yes_price(m), confidence=0.8, reason="My reason" )) return 签名als
设置 strategy: my_strategy in config.yaml Test: python3 {baseDir}/scripts/机器人.py 扫描 --strategy my_strategy Risk Management
The 机器人 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 环境 Variables
Override config values via env vars:
DRY_运行=true — force dry 运行 mode STRATEGY=pAIr_arb — override strategy LOOP_INTERVAL=60 — override 扫描 interval PROBTRADE_技能_PATH=/path/to/probtrade/lib — custom path to probtrade 技能 lib 输出
All commands 输出 structured data (JSON or 格式化ted text) for easy parsing by AI 代理s.