Polymarket Weather Trader
by @simmer
Trade Polymarket weather markets using NOAA (US) and Open-Meteo (international) forecasts via Simmer API. Inspired by gopfan2's weather trading approach. Use...
clawhub install polymarket-weather-traderπ About This Skill
name: polymarket-weather-trader description: Trade Polymarket weather markets using NOAA (US) and Open-Meteo (international) forecasts via Simmer API. Inspired by gopfan2's weather trading approach. Use when user wants to trade temperature markets, automate weather bets, check forecasts, or run weather-based strategies. metadata: author: Simmer (@simmer_markets) version: "1.21.0" displayName: Polymarket Weather Trader difficulty: beginner attribution: Strategy inspired by gopfan2 (public Polymarket trader β approach referenced, not endorsed).
Polymarket Weather Trader
Trade temperature markets on Polymarket using NOAA forecast data.
> Template skill. Defaults to dry-run mode (no real money). The --live flag is a deliberate single-command opt-in for real-money execution. Configure tunables (entry/exit thresholds, locations, etc.) via env vars listed below.
Safety rails (read first)
This skill executes real-money trades on Polymarket only when the --live flag is passed AND the human's wallet is linked to their Simmer account. Trading is bounded by default:
python weather_trader.py (no flag) shows opportunities but executes no trades. The --live flag is required for real-money execution. There is no "auto-graduate" path.$SIM paper sandbox option. Set TRADING_VENUE=sim to trade Simmer's $SIM virtual currency at real prices β useful for validating the strategy without USDC exposure.SIMMER_WEATHER_MAX_POSITION_USD defaults to $2.00 per trade. Configurable via env var, capped at the user's dashboard-set platform per-trade limit.SIMMER_WEATHER_SLIPPAGE_MAX, default 15%), time-decay, and resolved-market status before every order. Disable only with --no-safeguards (not recommended).SIMMER_WEATHER_EXIT_THRESHOLD (default 0.45), or via client.cancel_order() / a manual sell.If anything above isn't clear, stop and ask the user before passing --live.
Strategy logic
Weather market outcomes are discrete: a temperature bucket ("34-35Β°F") either matches the actual high on resolution day or it doesn't. The strategy works when the NOAA forecast is more accurate than what the market has priced in.
Test before going live. The $SIM venue gives you a fully virtual sandbox at real market prices β recommended before any --live run.
Risk monitor. Stop-loss and take-profit thresholds are user settings (configurable at simmer.markets/dashboard β Settings β Auto Risk Monitor), shared across all skills under that user account. Per-position overrides via client.set_monitor(market_id, side, stop_loss_pct=..., take_profit_pct=...).
External wallet users: monitors emit alerts via the briefing endpoint β your agent must be running for sells to execute. Managed wallet users: server executes directly.
When to Use This Skill
Use this skill when the user wants to:
What's New in v1.21.0
resolution_criteria field). Previously the skill used a hardcoded city β station map, which silently traded against the wrong forecast in a few cases (notably Dallas, where Polymarket resolves on Love Field / KDAL but the skill assumed DFW / KDFW). Markets that name a station the skill doesn't know are now skipped with a log line β better to skip than to trade a stale oracle. Robust to Polymarket swapping airports.?include=resolution_criteria flag on /api/sdk/markets (live on Simmer backend 2026-05-03).What's New in v1.20.1
--live requirement, configurable caps, server-side risk monitor, strategy-side safeguards, reversibility.What's New in v1.20.0
SimmerClient.from_env() (auto-reads SIMMER_API_KEY, raises a clear RuntimeError with a dashboard pointer if unset). Requires simmer-sdk>=0.13.0.AUTOMATON_* env reads (the automaton runtime was retired 2026-04-20).Setup
For wallet setup, see docs.simmer.markets/wallets.
Required environment:
SIMMER_API_KEY β get from simmer.markets/dashboard β SDK tabWALLET_PRIVATE_KEY β Polymarket wallet private key (the SDK signs orders client-side)Then pip install --upgrade simmer-sdk (>=0.13.0) and configure tunables below.
Configuration
| Setting | Environment Variable | Default | Description |
|---------|---------------------|---------|-------------|
| Trading venue | TRADING_VENUE | polymarket | Venue to trade on. Set sim for paper trading. |
| Entry threshold | SIMMER_WEATHER_ENTRY_THRESHOLD | 0.15 | Buy when price below this |
| Exit threshold | SIMMER_WEATHER_EXIT_THRESHOLD | 0.45 | Sell when price above this |
| Max position | SIMMER_WEATHER_MAX_POSITION_USD | 2.00 | Maximum USD per trade |
| Max trades/run | SIMMER_WEATHER_MAX_TRADES_PER_RUN | 5 | Maximum trades per scan cycle |
| Locations | SIMMER_WEATHER_LOCATIONS | NYC | Comma-separated cities (NYC, Chicago, Seattle, Atlanta, Dallas, Miami) |
| Binary only | SIMMER_WEATHER_BINARY_ONLY | false | Skip range-bucket events (e.g., "34-35Β°F"), only trade binary yes/no markets |
| Smart sizing % | SIMMER_WEATHER_SIZING_PCT | 0.05 | % of balance per trade |
| Slippage max | SIMMER_WEATHER_SLIPPAGE_MAX | 0.15 | Skip trades with slippage above this (0.15 = 15%) |
| Min liquidity | SIMMER_WEATHER_MIN_LIQUIDITY | 0 | Skip markets with liquidity below this USD amount (0 = disabled) |
| Vol targeting | SIMMER_WEATHER_VOL_TARGETING | false | Enable volatility targeting for dynamic position sizing |
| Target vol | SIMMER_WEATHER_TARGET_VOL | 0.20 | Target annualized volatility (0.20 = 20%) |
| Vol max leverage | SIMMER_WEATHER_VOL_MAX_LEVERAGE | 2.0 | Max scale-up multiplier in calm markets |
| Vol min alloc | SIMMER_WEATHER_VOL_MIN_ALLOC | 0.2 | Min allocation floor in volatile markets (0.2 = 20%) |
| Vol EWMA span | SIMMER_WEATHER_VOL_SPAN | 10 | EWMA span for vol calculation (lower = more responsive) |
| Order type | SIMMER_WEATHER_ORDER_TYPE | GTC | GTC (limit, waits for fill) or FAK (cancel if not filled). GTC recommended. |
Legacy env var aliases (still accepted for backwards compatibility): SIMMER_WEATHER_ENTRY, SIMMER_WEATHER_EXIT, SIMMER_WEATHER_MAX_POSITION, SIMMER_WEATHER_MAX_TRADES
Supported locations (city-name filter applied to market questions): NYC, Chicago, Seattle, Atlanta, Dallas, Miami, plus international cities (Tel Aviv, Munich, London, Tokyo, Seoul, Ankara, Lucknow, Wellington, Madrid, Milan, Amsterdam, Taipei). The actual oracle station is parsed per-market from resolution_criteria β see "Resolution-source routing" below.
Resolution-source routing
Polymarket weather markets carry a resolution_criteria field that names the exact station the market resolves on (e.g. "Chicago O'Hare Intl Airport Station" with wunderground.com/.../KORD). v1.21.0+ parses that text per-market and routes to the matching forecast station instead of a city default. If a market names a station the skill doesn't know, the event is skipped with a log line. Add new stations to STATION_ID_TO_NOAA (US) or INTERNATIONAL_STATION_TO_CITY (international) in weather_trader.py to extend coverage β PRs welcome.
SDK initialization
from simmer_sdk import SimmerClientclient = SimmerClient.from_env(venue="polymarket", live=True)
from_env() (added in simmer-sdk 0.13.0) reads SIMMER_API_KEY from the environment and raises RuntimeError with a dashboard pointer if unset. If OWS_WALLET is set, it auto-routes through the OpenClaw shared wallet.
Quick Commands
# Check account balance and positions
python scripts/status.pyDetailed position list
python scripts/status.py --positions
API Reference:
https://api.simmer.marketsAuthorization: Bearer $SIMMER_API_KEYGET /api/sdk/portfolioGET /api/sdk/positionsRunning the Skill
# Dry run (default β shows opportunities, no trades)
python weather_trader.pyExecute real trades
python weather_trader.py --liveWith smart position sizing (uses portfolio balance)
python weather_trader.py --live --smart-sizingCheck positions only
python weather_trader.py --positionsView config
python weather_trader.py --configDisable safeguards (not recommended)
python weather_trader.py --no-safeguardsDisable trend detection
python weather_trader.py --no-trendsEnable volatility targeting (dynamic sizing based on market vol)
python weather_trader.py --live --smart-sizing --vol-targetingQuiet mode β only output on trades/errors (ideal for high-frequency runs)
python weather_trader.py --live --quiet
How It Works
Each cycle the script:
1. Fetches active weather markets from Simmer API
2. Groups markets by event (each temperature day is one event)
3. Parses event names to get location and date
4. Fetches NOAA forecast for that location/date
5. Finds the temperature bucket that matches the forecast
6. Safeguards: Checks context for flip-flop warnings, slippage, time decay
7. Trend Detection: Looks for recent price drops (stronger buy signal)
8. Entry: If bucket price < threshold and safeguards pass β BUY
9. Exit: Checks open positions, sells if price > exit threshold
10. Tagging: All trades tagged with sdk:weather for tracking
Smart Sizing
With --smart-sizing, position size is calculated as:
SIMMER_WEATHER_SIZING_PCT)Volatility Targeting
With --vol-targeting, position sizes are dynamically adjusted based on realized market volatility:
position_size = base_size Γ clamp(target_vol / realized_vol, min_alloc, max_leverage)
Safeguards
Before trading, the skill checks:
Disable with --no-safeguards (not recommended).
Source Tagging
All trades are tagged with source: "sdk:weather". This means:
sdk:weather are excluded from generic copytrade sells.Troubleshooting
"Safeguard blocked: Severe flip-flop warning" β you've been changing direction too much on this market; wait before trading again.
"Slippage too high" β market is illiquid; reduce position size or skip.
"Resolves in Xh - too soon" β market resolving soon, risk is elevated.
"No weather markets found" β weather markets may not be active (seasonal).
"External wallet requires a pre-signed order" β WALLET_PRIVATE_KEY is not set. Fix: export WALLET_PRIVATE_KEY=0x. The SDK signs orders automatically when this env var is present β do not attempt to sign orders manually.
"Balance shows $0 but I have funds on Polygon" β Polymarket V2 (live 2026-04-28) uses pUSD (PolyUSD, 1:1 backed by USDC.e). Migrate at simmer.markets/dashboard (~30s). Full guide: docs.simmer.markets/v2-migration.
"API key invalid" β get a new key from simmer.markets/dashboard β SDK tab.
βοΈ Configuration
| Setting | Environment Variable | Default | Description |
|---------|---------------------|---------|-------------|
| Trading venue | TRADING_VENUE | polymarket | Venue to trade on. Set sim for paper trading. |
| Entry threshold | SIMMER_WEATHER_ENTRY_THRESHOLD | 0.15 | Buy when price below this |
| Exit threshold | SIMMER_WEATHER_EXIT_THRESHOLD | 0.45 | Sell when price above this |
| Max position | SIMMER_WEATHER_MAX_POSITION_USD | 2.00 | Maximum USD per trade |
| Max trades/run | SIMMER_WEATHER_MAX_TRADES_PER_RUN | 5 | Maximum trades per scan cycle |
| Locations | SIMMER_WEATHER_LOCATIONS | NYC | Comma-separated cities (NYC, Chicago, Seattle, Atlanta, Dallas, Miami) |
| Binary only | SIMMER_WEATHER_BINARY_ONLY | false | Skip range-bucket events (e.g., "34-35Β°F"), only trade binary yes/no markets |
| Smart sizing % | SIMMER_WEATHER_SIZING_PCT | 0.05 | % of balance per trade |
| Slippage max | SIMMER_WEATHER_SLIPPAGE_MAX | 0.15 | Skip trades with slippage above this (0.15 = 15%) |
| Min liquidity | SIMMER_WEATHER_MIN_LIQUIDITY | 0 | Skip markets with liquidity below this USD amount (0 = disabled) |
| Vol targeting | SIMMER_WEATHER_VOL_TARGETING | false | Enable volatility targeting for dynamic position sizing |
| Target vol | SIMMER_WEATHER_TARGET_VOL | 0.20 | Target annualized volatility (0.20 = 20%) |
| Vol max leverage | SIMMER_WEATHER_VOL_MAX_LEVERAGE | 2.0 | Max scale-up multiplier in calm markets |
| Vol min alloc | SIMMER_WEATHER_VOL_MIN_ALLOC | 0.2 | Min allocation floor in volatile markets (0.2 = 20%) |
| Vol EWMA span | SIMMER_WEATHER_VOL_SPAN | 10 | EWMA span for vol calculation (lower = more responsive) |
| Order type | SIMMER_WEATHER_ORDER_TYPE | GTC | GTC (limit, waits for fill) or FAK (cancel if not filled). GTC recommended. |
Legacy env var aliases (still accepted for backwards compatibility): SIMMER_WEATHER_ENTRY, SIMMER_WEATHER_EXIT, SIMMER_WEATHER_MAX_POSITION, SIMMER_WEATHER_MAX_TRADES
Supported locations (city-name filter applied to market questions): NYC, Chicago, Seattle, Atlanta, Dallas, Miami, plus international cities (Tel Aviv, Munich, London, Tokyo, Seoul, Ankara, Lucknow, Wellington, Madrid, Milan, Amsterdam, Taipei). The actual oracle station is parsed per-market from resolution_criteria β see "Resolution-source routing" below.
π Tips & Best Practices
"Safeguard blocked: Severe flip-flop warning" β you've been changing direction too much on this market; wait before trading again.
"Slippage too high" β market is illiquid; reduce position size or skip.
"Resolves in Xh - too soon" β market resolving soon, risk is elevated.
"No weather markets found" β weather markets may not be active (seasonal).
"External wallet requires a pre-signed order" β WALLET_PRIVATE_KEY is not set. Fix: export WALLET_PRIVATE_KEY=0x. The SDK signs orders automatically when this env var is present β do not attempt to sign orders manually.
"Balance shows $0 but I have funds on Polygon" β Polymarket V2 (live 2026-04-28) uses pUSD (PolyUSD, 1:1 backed by USDC.e). Migrate at simmer.markets/dashboard (~30s). Full guide: docs.simmer.markets/v2-migration.
"API key invalid" β get a new key from simmer.markets/dashboard β SDK tab.