Polymarket Trader
Maintain a profitable BTC 1h Up/Down strategy by anchoring decisions to Binance BTCUSDT (the resolution source) and enforcing anti-churn/risk rules.
Workflow (use this order)
1) Confirm the market type
- - This skill is optimized for
bitcoin-up-or-down-* 1h markets (Binance 1H open vs close).
2) Compute the anchor signal (Binance)
- - Fetch 1m closes + the 1h open for the relevant hour.
- Compute volatility (sigma) and time-to-expiry.
- Convert to fair probability for Up/Down.
3) Trade only when there is measurable edge
- - Enter only if
edge = fair_prob - market_price exceeds a threshold. - Add a directional guardrail: do not bet against the sign of the move when |z| is non-trivial.
4) Exit using the right logic for the entry mode
- - Model entries: exit on edge decay / model flip; hold to preclose when confidence is extreme.
- Mean-reversion entries: exit on reversion targets (not model-tp), with strict churn limits.
5) Validate with logs
- - Every suspected “nonsense trade” must be explained via:
-
reason /
entry_mode
- Binance-derived fair probability + z
- whether the correct exit block fired
Bundled scripts
All scripts are designed to be run from the OpenClaw workspace.
1) Fetch Binance klines
- Pulls klines and prints JSON.
2) Dump/stabilization and regime metrics
- Computes ret5/ret15/slope10 + simple “stabilized” boolean.
3) Explain fills (events.jsonl) with Binance context
- Reads paperbot
events.jsonl and prints a concise table for the last N fills:
- side/outcome/px/reason
- estimated fair_up + z
- “against trend?” flag
References
- -
{baseDir}/references/strategy.md — the math model, parameters, and tuning checklist.
Polymarket Trader
通过将决策锚定于 Binance BTCUSDT(解析源)并执行反流失/风险规则,维持盈利的 BTC 1小时涨/跌 策略。
工作流程(按此顺序执行)
1) 确认市场类型
- - 本技能针对 bitcoin-up-or-down-* 1小时市场(Binance 1小时开盘价与收盘价)进行优化。
2) 计算锚定信号(Binance)
- - 获取相关小时的1分钟收盘价及1小时开盘价。
- 计算波动率(sigma)和到期时间。
- 转换为涨/跌的公平概率。
3) 仅在存在可测量优势时交易
- - 仅当 优势 = 公平概率 - 市场价格 超过阈值时入场。
- 添加方向性护栏:当 |z| 值显著时,不得逆势押注。
4) 根据入场模式使用正确的退出逻辑
- - 模型入场:在优势衰减/模型翻转时退出;当置信度极端时持有至预平仓。
- 均值回归入场:在回归目标(非模型止盈)时退出,并设置严格流失限制。
5) 通过日志验证
- 原因 / 入场模式
- Binance衍生的公平概率 + z值
- 是否正确触发了退出模块
捆绑脚本
所有脚本设计为从 OpenClaw 工作区运行。
1) 获取 Binance K线数据
- - {baseDir}/scripts/binance_klines.py
- 拉取K线数据并输出JSON。
2) 转储/稳定性和制度指标
- - {baseDir}/scripts/binance_regime.py
- 计算 ret5/ret15/slope10 + 简单的“稳定”布尔值。
3) 使用 Binance 上下文解释成交记录(events.jsonl)
- - {baseDir}/scripts/explain_fills.py
- 读取 paperbot 的 events.jsonl 并输出最近 N 笔成交的简明表格:
- 方向/结果/价格/原因
- 预估公平上涨概率 + z值
- “逆势?”标记
参考资料
- - {baseDir}/references/strategy.md — 数学模型、参数及调优检查清单。