Trading
by @leogordon2004
Trade Polymarket BTC 5-minute and 15-minute fast markets using CEX price momentum signals via Simmer API. Default signal is Binance BTC/USDT klines. Use when...
clawhub install polyπ About This Skill
name: polymarket-fast-loop displayName: Polymarket FastLoop Trader description: Trade Polymarket BTC 5-minute and 15-minute fast markets using CEX price momentum signals via Simmer API. Default signal is Binance BTC/USDT klines. Use when user wants to trade sprint/fast markets, automate short-term crypto trading, or use CEX momentum as a Polymarket signal. metadata: {"clawdbot":{"emoji":"β‘","requires":{"env":["SIMMER_API_KEY"]},"cron":null,"autostart":false}} authors: - Simmer (@simmer_markets) version: "1.0.6" published: true
Polymarket FastLoop Trader
Trade Polymarket's 5-minute BTC fast markets using real-time price momentum from Binance.
> Polymarket only. All trades execute on Polymarket with real USDC. Use --live for real trades, dry-run is the default.
How it works: Every cycle, the script finds the current live BTC fast market, checks BTC price momentum on Binance, and trades if momentum diverges from market odds.
This is a template. The default signal (Binance momentum) gets you started. Your agent's reasoning is the edge β layer on sentiment analysis, multi-exchange spreads, news feeds, or custom signals to improve it.
> β οΈ Fast markets carry Polymarket's 10% fee (is_paid: true). Factor this into your edge calculations.
When to Use This Skill
Use this skill when the user wants to:
Setup Flow
When user asks to install or configure this skill:
1. Ask for Simmer API key
- Get from simmer.markets/dashboard β SDK tab
- Store in environment as SIMMER_API_KEY
2. Ask about settings (or confirm defaults) - Asset: BTC, ETH, or SOL (default BTC) - Entry threshold: Min divergence to trade (default 5Β’) - Max position: Amount per trade (default $5.00) - Window: 5m or 15m (default 5m)
3. Set up cron or loop (user drives scheduling β see "How to Run on a Loop")
Quick Start
# Set your API key
export SIMMER_API_KEY="your-key-here"Dry run β see what would happen
python fastloop_trader.pyGo live
python fastloop_trader.py --liveLive + quiet (for cron/heartbeat loops)
python fastloop_trader.py --live --quietLive + smart sizing (5% of balance per trade)
python fastloop_trader.py --live --smart-sizing --quiet
How to Run on a Loop
The script runs one cycle β your bot drives the loop. Set up a cron job or heartbeat:
Every 5 minutes (one per fast market window):
*/5 * * * * cd /path/to/skill && python fastloop_trader.py --live --quiet
Every 1 minute (more aggressive, catches mid-window opportunities):
* * * * * cd /path/to/skill && python fastloop_trader.py --live --quiet
Via OpenClaw heartbeat: Add to your HEARTBEAT.md:
Run: cd /path/to/fast market && python fastloop_trader.py --live --quiet
Configuration
Configure via config.json, environment variables, or --set:
# Change entry threshold
python fastloop_trader.py --set entry_threshold=0.08Trade ETH instead of BTC
python fastloop_trader.py --set asset=ETHMultiple settings
python fastloop_trader.py --set min_momentum_pct=0.3 --set max_position=10
Settings
| Setting | Default | Env Var | Description |
|---------|---------|---------|-------------|
| entry_threshold | 0.05 | SIMMER_SPRINT_ENTRY | Min price divergence from 50Β’ to trigger |
| min_momentum_pct | 0.5 | SIMMER_SPRINT_MOMENTUM | Min BTC % move to trigger |
| max_position | 5.0 | SIMMER_SPRINT_MAX_POSITION | Max $ per trade |
| signal_source | binance | SIMMER_SPRINT_SIGNAL | Price feed (binance, coingecko) |
| lookback_minutes | 5 | SIMMER_SPRINT_LOOKBACK | Minutes of price history |
| min_time_remaining | 60 | SIMMER_SPRINT_MIN_TIME | Skip fast markets with less time left (seconds) |
| asset | BTC | SIMMER_SPRINT_ASSET | Asset to trade (BTC, ETH, SOL) |
| window | 5m | SIMMER_SPRINT_WINDOW | Market window duration (5m or 15m) |
| volume_confidence | true | SIMMER_SPRINT_VOL_CONF | Weight signal by Binance volume |
Example config.json
{
"entry_threshold": 0.08,
"min_momentum_pct": 0.3,
"max_position": 10.0,
"asset": "BTC",
"window": "5m",
"signal_source": "binance"
}
CLI Options
python fastloop_trader.py # Dry run
python fastloop_trader.py --live # Real trades
python fastloop_trader.py --live --quiet # Silent except trades/errors
python fastloop_trader.py --smart-sizing # Portfolio-based sizing
python fastloop_trader.py --positions # Show open fast market positions
python fastloop_trader.py --config # Show current config
python fastloop_trader.py --set KEY=VALUE # Update config
Signal Logic
Default signal (Binance momentum):
1. Fetch last 5 one-minute candles from Binance (BTCUSDT)
2. Calculate momentum: (price_now - price_5min_ago) / price_5min_ago
3. Compare momentum direction to current Polymarket odds
4. Trade when:
- Momentum β₯ min_momentum_pct (default 0.5%)
- Price diverges from 50Β’ by β₯ entry_threshold (default 5Β’)
- Volume ratio > 0.5x average (filters out thin moves)
Example: BTC up 0.8% in last 5 min, but fast market YES price is only $0.52. The 3Β’ divergence from the expected ~$0.55 β buy YES.
Customizing Your Signal
The default momentum signal is a starting point. To add your own edge:
The skill handles all the Simmer plumbing (discovery, import, trade execution). Your agent provides the alpha.
Example Output
β‘ Simmer FastLoop Trading Skill
================================================== [DRY RUN] No trades will be executed. Use --live to enable trading.
βοΈ Configuration:
Asset: BTC
Entry threshold: 0.05 (min divergence from 50Β’)
Min momentum: 0.5% (min price move)
Max position: $5.00
Signal source: binance
Lookback: 5 minutes
Min time left: 60s
Volume weighting: β
π Discovering BTC fast markets...
Found 3 active fast markets
π― Selected: Bitcoin Up or Down - February 15, 5:30AM-5:35AM ET
Expires in: 185s
Current YES price: $0.480
π Fetching BTC price signal (binance)...
Price: $97,234.50 (was $96,812.30)
Momentum: +0.436%
Direction: up
Volume ratio: 1.45x avg
π§ Analyzing...
βΈοΈ Momentum 0.436% < minimum 0.500% β skip
π Summary: No trade (momentum too weak: 0.436%)
Source Tagging
All trades are tagged with source: "sdk:fastloop". This means:
Troubleshooting
"No active fast markets found"
"No fast markets with >60s remaining"
min_time_remaining if you want to trade closer to expiry"Import failed: Rate limit exceeded"
"Failed to fetch price data"
--set signal_source=coingecko as fallback"Trade failed: no liquidity"
π‘ Examples
# Set your API key
export SIMMER_API_KEY="your-key-here"Dry run β see what would happen
python fastloop_trader.pyGo live
python fastloop_trader.py --liveLive + quiet (for cron/heartbeat loops)
python fastloop_trader.py --live --quietLive + smart sizing (5% of balance per trade)
python fastloop_trader.py --live --smart-sizing --quiet
βοΈ Configuration
Configure via config.json, environment variables, or --set:
# Change entry threshold
python fastloop_trader.py --set entry_threshold=0.08Trade ETH instead of BTC
python fastloop_trader.py --set asset=ETHMultiple settings
python fastloop_trader.py --set min_momentum_pct=0.3 --set max_position=10
Settings
| Setting | Default | Env Var | Description |
|---------|---------|---------|-------------|
| entry_threshold | 0.05 | SIMMER_SPRINT_ENTRY | Min price divergence from 50Β’ to trigger |
| min_momentum_pct | 0.5 | SIMMER_SPRINT_MOMENTUM | Min BTC % move to trigger |
| max_position | 5.0 | SIMMER_SPRINT_MAX_POSITION | Max $ per trade |
| signal_source | binance | SIMMER_SPRINT_SIGNAL | Price feed (binance, coingecko) |
| lookback_minutes | 5 | SIMMER_SPRINT_LOOKBACK | Minutes of price history |
| min_time_remaining | 60 | SIMMER_SPRINT_MIN_TIME | Skip fast markets with less time left (seconds) |
| asset | BTC | SIMMER_SPRINT_ASSET | Asset to trade (BTC, ETH, SOL) |
| window | 5m | SIMMER_SPRINT_WINDOW | Market window duration (5m or 15m) |
| volume_confidence | true | SIMMER_SPRINT_VOL_CONF | Weight signal by Binance volume |
Example config.json
{
"entry_threshold": 0.08,
"min_momentum_pct": 0.3,
"max_position": 10.0,
"asset": "BTC",
"window": "5m",
"signal_source": "binance"
}
π Tips & Best Practices
"No active fast markets found"
"No fast markets with >60s remaining"
min_time_remaining if you want to trade closer to expiry"Import failed: Rate limit exceeded"
"Failed to fetch price data"
--set signal_source=coingecko as fallback"Trade failed: no liquidity"