Polymarket Divergence Trader
This skill is a publishable Simmer trading template for ClawHub. It compares your probability estimate with the live market price, checks market context, and only places a trade when the edge clears a configurable threshold.
This is a template. The default signal is probability divergence: if your model thinks the event is more likely than the market implies, the skill buys YES; if less likely, it buys NO. Remix the signal source with your own model, API, or research. The skill handles trade discipline, operator output, and Simmer trade tagging.
When To Use
Use this skill when an agent already has a probability estimate for a specific Simmer-indexed market and needs a safe execution wrapper around that signal.
Skill Folder
This skill ships with three files:
- SKILL.md
- clawhub.json
- divergence_trader.py
Defaults
- Dry-run venue: sim
- Live venue: polymarket
- Trade size: 5.0
- Minimum edge: 0.05
- Execution mode: dry-run unless
--live is passed
- Trade source:
sdk:polymarket-divergence-trader
- Skill slug:
polymarket-divergence-trader
Required Inputs
The skill expects:
SIMMER_API_KEY
MARKET_ID for the target market
MY_PROBABILITY as a decimal between 0 and 1
Optional inputs:
TRADE_SIZE
MIN_EDGE
REASONING_PREFIX
LIVE_VENUE to override the live venue if you intentionally want something other than polymarket
Safety Rules
- Always fetch market context before deciding.
- Always default to dry-run. Live trading requires explicit
--live.
- Always attach
source, skill_slug, and human-readable reasoning.
- Skip trading when context reports warnings, severe flip-flop risk, or excessive slippage.
- Return
HOLD when the edge is smaller than the configured threshold.
- Pass the venue explicitly by choosing the correct client venue for dry-run versus live execution.
Decision Logic
- Read the live market probability from market context.
- Compute
edge = my_probability - market_probability.
- If
edge >= min_edge, buy YES.
- If
edge <= -min_edge, buy NO.
- Otherwise hold.
Example Commands
Dry-run:
python divergence_trader.py --market-id 12345 --my-probability 0.62
Live trade:
python divergence_trader.py --market-id 12345 --my-probability 0.62 --amount 5 --live
Expected Operator Output
The script prints an operator-style summary:
Skill: polymarket-divergence-trader
Venue: sim
Risk alerts:
- none
Decision:
- 12345: TRADE YES size=5.00 mode=dry-run edge=+7.0%
Remix Ideas
- Replace
MY_PROBABILITY with a forecast model output.
- Drive
MARKET_ID from a market scanner.
- Add bankroll-aware sizing before the trade call.
- Extend the loop to poll on a cron schedule and auto-redeem winning positions.