Skill: djdyll/polymarket-btc-midcandle (version 1.1.1)

--- name: polymarket-btc-midcandle description: "BTC Mid-Candle Scalper — 75%+ win rate on Polymarket BTC 15-minute markets. Enters mid-candle (2–12 min remaining) when intracandle momentum is confirmed by 5m + 3m price change. Fully configurable: tune the momentum threshold, volume gate, and entry price window to dial in your own edge. Proven on real money. Use when you want a battle-tested, high-WR crypto trading bot running 24/7 on Polymarket." metadata: author: "DjDyll" version: "1.1.1" displayName: "BTC Mid-Candle Scalper" difficulty: "intermediate" --- # BTC Mid-Candle Scalper 🔥 > **75%+ win rate. Real money. 400+ trades.** > This is the highest-performing BTC strategy in the Simmer ecosystem — built, battle-tested, and profitable over months of live trading. Now you can run it yourself. > **This is a template.** The default signal is mid-candle BTC momentum from Binance klines — > remix it with your own data sources, tighter time windows, or custom volume filters. > The skill handles all the plumbing (market discovery, trade execution, safeguards). > Your tuning provides the alpha. --- ## What It Does Polymarket's BTC Up/Down markets close every 15 minutes at :00, :15, :30, and :45. Most traders enter blind at candle open — guessing direction with no data. This strategy waits. **The edge:** By the time 2–12 minutes remain in a candle, BTC has shown its hand. If 5-minute and 3-minute price changes both agree on direction AND volume confirms it isn't noise — that's a high-conviction trade with a known time horizon. **The result:** 65–75%+ win rate depending on your settings. Defaults are calibrated to produce edge out of the box. > ⚠️ **Important:** The defaults are a starting point, not a magic formula. **You need to fine-tune these settings to your account size, risk tolerance, and market conditions.** A trader who tunes their thresholds will outperform one who runs defaults. The strategy section below explains exactly what each knob does. --- ## Setup ### 1. Install & configure ```bash clawhub install polymarket-btc-midcandle ``` Set your API key: ```bash export SIMMER_API_KEY=sk_live_your_key_here ``` Or set it in your `.env` file if using OpenClaw. ### 2. Get your Poly Agent ID Find it at **simmer.markets/dashboard → Agents**. Copy your agent ID. ```bash python btc_midcandle.py --set poly_agent_id=your_agent_id_here ``` ### 3. Run in paper mode first ```bash python btc_midcandle.py ``` You'll see `[PAPER MODE]` — no real money moves. Watch it for a day. Make sure the signals make sense. ### 4. Go live ```bash python btc_midcandle.py --live ``` ### 5. Set up cron (recommended) ```bash crontab -e ``` Add: ``` 3,8,13,18,23,28,33,38,43,48,53,58 * * * * cd /path/to/skill && python btc_midcandle.py --live >> /var/log/btc-midcandle.log 2>&1 ``` Runs every 5 minutes. This timing is intentional — entering slightly after the candle opens gives you confirmed momentum rather than a guess. --- ## Configuration ```bash # View current config python btc_midcandle.py --config # Set a value python btc_midcandle.py --set momentum_threshold=0.0012 python btc_midcandle.py --set bet_size=10.0 ``` | Parameter | Env Var | Default | Description | |-----------|---------|---------|-------------| | `poly_agent_id` | `SIMMER_BTCMC_AGENT_ID` | — | Your Polymarket agent ID (required) | | `bet_size` | `SIMMER_BTCMC_BET_SIZE` | `5.0` | USDC per trade | | `momentum_threshold` | `SIMMER_BTCMC_THRESHOLD` | `0.0015` | Min 5m price change (0.15%) | | `min_volume_ratio` | `SIMMER_BTCMC_VOL_RATIO` | `1.2` | Volume vs 2h avg (0 = disabled) | | `min_entry_price` | `SIMMER_BTCMC_MIN_ENTRY` | `0.45` | Min entry price per side | | `max_entry_price` | `SIMMER_BTCMC_MAX_ENTRY` | `0.65` | Max entry price per side | | `enable_1m_confirm` | `SIMMER_BTCMC_1M_CONFIRM` | `false` | Require 1m candle to confirm | | `skip_hours` | `SIMMER_BTCMC_SKIP_HOURS` | `2,9,10,11,15` | UTC hours to skip (see warning below) | | `discord_webhook` | `SIMMER_BTCMC_WEBHOOK` | `""` | Discord alert webhook (optional) | | `max_position_usd` | `SIMMER_BTCMC_MAX_POSITION` | `50.0` | Max USDC per trade when using `--smart-sizing` | | `sizing_pct` | `SIMMER_BTCMC_SIZING_PCT` | `0.03` | Portfolio % per trade when using `--smart-sizing` (3%) | --- > ⛔ **Skip Hours — Do Not Remove Without Data** > > The following UTC hours are **skipped by default** because BTC midcandle has historically poor win rate during these windows: > > | Hour (UTC) | Local time (ET) | Why it's bad | > |------------|-----------------|--------------| > | 2h | 10pm ET (prev night) | Low volume, thin books, random noise | > | 9h | 5am ET | Pre-market — BTC drifts without conviction | > | 10h | 6am ET | Pre-market open — spread widens, fills unpredictable | > | 11h | 7am ET | Early NY session — choppy before real volume arrives | > | 15h | 11am ET | Post-open chop — directional momentum breaks down | > > These are configured as `skip_hours = "2,9,10,11,15"` and enforced automatically. > **Do not remove hours from this list without your own shadow data showing consistent WR above 55% for that hour.** Trading these hours is the single fastest way to drag your win rate below breakeven. --- ## Tuning Guide This is where you find your edge. The defaults produce solid results, but tuning to your conditions can meaningfully improve win rate. ### Momentum threshold (`momentum_threshold`) Controls how much BTC must move in 5 minutes before you enter. - **Lower (0.0010):** More trades, slightly lower accuracy. Good in trending markets. - **Higher (0.0020):** Fewer trades, only strong moves. Better in choppy conditions. - **Start here:** Run paper mode for 3–5 days. Check your `--positions` output. If you're getting too many marginal trades, raise it. ### Volume ratio (`min_volume_ratio`) Filters out low-volume momentum that tends to reverse. - **0 (disabled):** Maximum trade frequency. Raw momentum only. - **1.2 (default):** Only trade when volume is 1.2× the 2-hour average. - **1.5–2.0:** High-conviction only. Fewer trades, but strong volume confirmation. ### Entry price window (`min_entry_price` / `max_entry_price`) Filters out bad entries. Entry price is how much you pay per share. - **Too cheap (<0.40):** You're betting against the crowd. Usually wrong. - **Too expensive (>0.70):** High cost, limited upside. - **Sweet spot (0.45–0.65):** Balanced risk/reward. Default is calibrated here. ### 1m confirmation (`enable_1m_confirm`) — OFF by default Adds a final gate: the last 1-minute candle must agree with your direction before a trade fires. - **Disabled (default):** More trades, some noise. Good baseline to start. - **Enabled:** Reduces false signals at the cost of some missed entries. Recommended once you're comfortable with the strategy. > 💡 **Tip:** Try enabling this after your first week. Compare your win rate with vs without — most traders see a meaningful improvement on choppy days. --- ## Commands ```bash # Paper trade (default) python btc_midcandle.py # Live trade python btc_midcandle.py --live # Show open positions python btc_midcandle.py --positions # Portfolio-based sizing (% of balance) python btc_midcandle.py --live --smart-sizing # Skip safeguards (advanced — not recommended) python btc_midcandle.py --live --no-safeguards # View config python btc_midcandle.py --config # Set a config value python btc_midcandle.py --set bet_size=10 ``` --- ## Example Output ``` ============================================================ 🔴 LIVE: BTC Mid-Candle Scalper — 2026-03-15 22:33 UTC ============================================================ ⏰ Candle :30 | 8 min remaining | ✅ In window 📊 Volume: 1.41x ✅ 📈 Momentum: up | 5m: +0.1821% | 3m: +0.0943% 📋 Market: Will BTC go up or down — March 15, 10:30-10:45PM ET? 💲 Entry price: 0.512 (side=yes) 🚀 Placing YES $5.00 — Mid-candle up (8m left): 5m=+0.1821% 3m=+0.0943% vol=1.41x ✅ Filled: 9.7 YES shares for $5.00 ``` --- ## Remix Ideas The skill handles market discovery, execution, and safeguards. Swap in your own signal: - **Fear & Greed signal:** Only trade when Crypto Fear & Greed is above 60 (greed confirms momentum) - **Order flow:** Add Binance aggTrades to confirm buy/sell pressure before entering - **Multi-asset confirmation:** Only enter BTC UP if ETH is also moving up (correlated moves are stronger) - **News filter:** Skip trades during scheduled macro events (CPI, Fed announcements) --- ## Troubleshooting **No trades firing?** - Check your cron is running: `tail -f /var/log/btc-midcandle.log` - Momentum threshold may be too high for current market conditions — try lowering to `0.0010` - Check Binance API is reachable from your server **Too many losing trades?** - Raise `momentum_threshold` — only trade stronger moves - Enable `enable_1m_confirm` — adds a final confirmation step - Raise `min_volume_ratio` to `1.5` — only trade high-conviction volume **"No active BTC market found"?** - Verify your `poly_agent_id` is set correctly - Check Simmer API status at status.simmer.markets **Win rate lower than expected?** - Run paper mode for a week before going live — calibrate thresholds to your specific market hours - Check `--positions` for markets that are resolving against you — look for patterns in losing trades


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)