Trade Polymarket 5-minute crypto fast markets using candle body analysis and volume surge detection from Binance. A stronger, data-driven alternative to simple momentum signals.
> This is a template. The default signal uses Binance 1-minute candle structure (body/range ratio + volume surge). Remix it with your own thresholds, additional indicators, or alternative data sources. The skill handles all the plumbing (market discovery, import, trade execution). Your agent provides the alpha.
> Fast markets carry Polymarket's 10% fee (is_paid: true). The default thresholds are calibrated to maintain edge after fees.
Most fast-market skills use simple price momentum (did price go up or down?). This skill looks at how price moved:
Simple momentum catches every wiggle. Candle body analysis filters for quality moves:
Backtested on BTC/ETH/SOL/XRP/BNB (3 months, 6131 five-minute slots):
body > 65% + volume > 1.5x: 86.3% win rate (N=292)body > 60% + volume > 1.5x: 84.7% win rate (N=333)pip dependencies: simmer-sdk, requests
Environment variables:
SIMMER_API_KEY (required) - get from simmer.markets/dashboardNo other credentials needed. The script only reads SIMMER_API_KEY from the environment. All trades go through SimmerClient.trade() - no wallet private key, no direct CLOB access.
export SIMMER_API_KEY="your_key_here"
# Dry run (default, no trades placed)
python candle_momentum.py
# Live trading via SimmerClient
python candle_momentum.py --live
# Quiet mode for cron
python candle_momentum.py --live --quiet
The script runs one cycle. Set up a cron (every 2 min recommended for 5min markets):
*/2 * * * * cd /path/to/skill && SIMMER_API_KEY=your_key python candle_momentum.py --live --quiet
SIMMER_API_KEY is read from environment. Nothing else.automaton.managed is false - the skill does not auto-execute.--live must be passed explicitly.SimmerClient--live: calls SimmerClient.trade() with side, amount, reasoningVia environment variables only (no local file persistence):
python candle_momentum.py --set body_threshold=0.65
python candle_momentum.py --set asset=ETH
python candle_momentum.py --set vol_threshold=2.0
| Setting | Default | Env Var | Description |
|---|---|---|---|
| --- | --- | --- | --- |
body_threshold | 0.60 | CM_BODY_THRESHOLD | Min candle body/range ratio (0-1) |
vol_threshold | 1.5 | CM_VOL_THRESHOLD | Min volume surge vs 3-candle average |
max_position | 5.0 | CM_MAX_POSITION | Max USD per trade |
assets | BTC,ETH,SOL,XRP,BNB | - | Assets to scan (picks best signal) |
asset | BTC | CM_ASSET | Single asset override (ignores assets) |
window | 5m | CM_WINDOW | Market window (5m or 15m) |
min_time_remaining | 60 | CM_MIN_TIME | Skip markets with less time (seconds) |
lookback_candles | 3 | CM_LOOKBACK | Candles for volume average |
entry_threshold | 0.05 | CM_ENTRY_THRESHOLD | Min price divergence from 50c |
python candle_momentum.py # Dry run
python candle_momentum.py --live # Real trades
python candle_momentum.py --live --quiet # Silent mode
python candle_momentum.py --positions # Show open positions
python candle_momentum.py --config # Show config
python candle_momentum.py --set KEY=VALUE # Update config
The candle body + volume signal is just the starting point. Ideas:
To customize, edit get_candle_signal() in candle_momentum.py.
Polymarket Candle Momentum Trader
==================================================
[DRY RUN] Use --live to enable trading.
Configuration:
Asset: BTC
Body threshold: 0.60 (min candle body ratio)
Vol threshold: 1.5x (min volume surge)
Max position: $5.00
Discovering BTC fast markets...
Found 3 active fast markets
Selected: Bitcoin Up or Down - Mar 19, 10:30-10:35AM ET
Expires in: 210s
Current YES price: $0.490
Fetching BTC candle data (binance)...
Last candle: O=84250 H=84312 L=84245 C=84305
Body ratio: 0.90 (strong!)
Direction: BULLISH
Volume surge: 2.3x avg
Signal: BUY YES (body=0.90, vol=2.3x, direction=UP)
Divergence: 5c (YES at 0.49, expected ~0.54)
[DRY RUN] Would buy $5.00 YES
All trades tagged with source: "sdk:candle-momentum" for portfolio tracking.
共 1 个版本