A BTC-only Polymarket trading robot that runs like clockwork: it discovers the rolling Bitcoin Up/Down 5-minute and 15-minute markets, prices them from live Binance data, trades only when every filter agrees, manages exits, settles expired positions on its own, and heals itself when a feed drops. Paper mode first, always.
https://nodejs.org (big green button, Next-Next-Finish).INSTALL_WINDOWS.bat. It checks Node, creates your config, installs everything.START_PAPER_WINDOWS.bat. Your browser opens on http://127.0.0.1:8765, the Setup Wizard greets you, the bot trades fake money on real markets. That's it.Mac / Linux / VPS: ./install.sh then ./start.sh.
Opens automatically the first time (or via ⚙ Setup Wizard). Five small steps:
.env.One click (🩺 Doctor in the dashboard, RUN_DOCTOR_WINDOWS.bat, or npm run doctor) runs every preflight check and tells you exactly how to fix what's wrong:
| Check | What it verifies |
|---|---|
| Node.js version | 20 or newer |
| Data folders | data/ and logs/ writable |
| Risk config sanity | caps make sense together |
| Binance reachable | BTC price source online |
| System clock | drift vs exchange time — critical: market windows are computed from your clock |
| Polymarket discovery | gamma-api reachable |
| Rolling BTC markets | a live btc-updown window answers on its deterministic slug |
| Polymarket CLOB | order API online + time drift |
| Live: credentials | key parses, API creds derive, signer ready |
| Live: USDC balance | balance visible for your signer/funder pair |
| Live: allowance | exchange allowance set (fix: one tiny manual trade on polymarket.com) |
| Live: trading status | account not in closed-only mode |
BTC data · Markets · Order API · Clock · Risk — green means healthy. If any turns red the bot stops entering new trades on its own and keeps managing what's open. Feeds reconnect automatically.
| Button | What it does |
|---|---|
| ▶ START / ■ STOP | Run / pause the engine. Stop also cancels maker quotes. |
| 🩺 Doctor | Full preflight report. |
| 🧹 Flatten all | Closes every open position at market, right now. |
| 🛑 Kill switch | Instantly blocks all new entries (persists across restarts). Exits and settlement keep working. |
| Reset paper | Wipes the paper ledger back to the starting balance (bot must be stopped). |
Edge scanner shows each market's fair value vs ask and why the bot is (not) trading. Risk rails shows caps and cooldowns. Open positions shows live unrealized P&L per position. Closed trades is your track record (with settled tags). Simple config edits the safe settings — secrets can never be changed there.
1 — Fair value. Each Up/Down window asks one question: will BTC finish above its opening price? The bot measures the live distance from the open, estimates real-time volatility from Binance trades, and converts time-remaining + distance + volatility into a probability (a digital-option pricing: P = Φ(ln(S/open) / (σ√τ))).
2 — Edge. If Polymarket sells YES at 54¢ while the model says 61¢, that's a 7¢ raw edge. A fee/adverse-selection buffer is subtracted first.
3 — Rails before any order. Minimum edge (stricter near expiry), maximum spread, minimum liquidity, price-zone filter (no lottery tickets under 10¢ or over 90¢), falling-fair-value filter, fresh-data guard, clock guard, plus every risk cap. All must pass.
4 — Execution. Fill-or-Kill order at a strict worst price: it fills completely at your price or not at all. No half-positions at bad prices, no phantom fills.
5 — Exits. Take-profit, stop-loss, max-hold, close-before-end — or settlement if the window expires first.
Where can an edge come from? Exactly where the serious Polymarket crypto bots play: pricing (a real model vs gut-feel clickers), speed (sub-second loop on Binance data while quotes go stale), niche (only BTC 5m/15m windows), and inventory discipline (tiny sizes, caps, cooldowns). None of that guarantees profit — it's the right way to look for it.
START_LIVE_WINDOWS.bat — it never auto-starts; you press START after reviewing.Polymarket accounts come in three flavors. The wizard asks one question and configures the signing for you:
| Case | You… | Signature type | Deposit address needed? |
|---|---|---|---|
| A | signed up with email / Magic link (most people) | 1 (proxy) | Yes — your Polymarket deposit address |
| B | connect MetaMask and your funds sit on that same address | 0 (EOA) | No |
| C | connect MetaMask but Polymarket created a smart wallet holding the funds | 2 (safe) | Yes |
Where to find things on polymarket.com: your deposit address is shown on the Deposit screen; the private key export lives in Settings (email accounts: "Export private key"). The key never leaves your machine — it lives in .env and signs orders locally.
| Setting | Plain meaning | Default |
|---|---|---|
| MAX_TRADE_USD | Biggest single bet | $5 |
| MAX_OPEN_POSITIONS | How many bets at once | 2 |
| MAX_POSITION_USD_PER_MARKET | Total exposure on one window | $12 |
| MAX_DAILY_TRADES | Anti-overtrading cap | 25 |
| MAX_DAILY_LOSS_USD | Daily circuit breaker — hits it, no more entries today | $20 |
| MIN_EDGE_CENTS | How "wrong" the market must be before betting | 4¢ |
| LATE_MIN_EDGE_CENTS | Stricter edge in the last minutes | 8¢ |
| MAX_SPREAD_CENTS | Skip sloppy books | 2.5¢ |
| MIN_LIQUIDITY_USD | Skip empty books | $10 |
| TAKE_PROFIT_CENTS / STOP_LOSS_CENTS | Exit targets per share | +4¢ / −3¢ |
| STOP_TRADING_BEFORE_CLOSE_SECONDS | No fresh entries in the final stretch | 120s |
| COOLDOWN_AFTER_STOP_SECONDS | Breathe after a stop-loss | 180s |
| KILL_SWITCH | Master "no new entries" switch | off |
Instead of paying the spread (taker), the bot can quote it: it rests a buy on YES and a buy on NO just below fair value, earning the spread when impatient traders cross — the style of the high-volume BTC 5m market-making accounts. Inventory is capped and skewed: the heavier one side gets, the less it bids for more of it. Positions are held to settlement by default.
Turn it on in Simple config (ENABLE_MAKER_MODE=true) — paper first, always. It coexists with taker entries (set TAKER_ENABLED=false for maker-only). Quotes are cancelled automatically on stop, kill, market rotation and shutdown.
@BotFather → /newbot → copy the token.https://api.telegram.org/bot<TOKEN>/getUpdates and copy your chat.id.TELEGRAM_NOTIFY (entries, exits, errors, daily, status).DASHBOARD_HOST=127.0.0.1 and reach it through an SSH tunnel (ssh -L 8765:127.0.0.1:8765 user@vps) — safest. If you must expose it, use a reverse proxy with HTTPS.docker compose up -d — restarts automatically, data and logs persist in mounted folders../start.sh inside tmux, or a systemd unit. The launcher's restart loop handles the dashboard's "Apply & Restart".| Symptom | Fix |
|---|---|
| "Node.js was not found" | Install Node LTS from nodejs.org, then rerun the installer. |
| Dashboard shows 🔒 | A DASHBOARD_PASSWORD is set — type it. Forgot it? Edit .env on the machine. |
| "BTC data" light red | Internet/firewall to Binance. The watchdog reconnects automatically; the bot won't trade meanwhile. |
| "Markets" light red | No active BTC window found. Run the Doctor — if Polymarket renamed the series, it will tell you to adjust ROLLING_SLUG_PREFIXES. |
| "Clock" light red | Enable automatic time sync in your OS. Critical: windows are computed from your clock. |
| Doctor: USDC balance $0 in live | Wrong wallet case. Recheck A/B/C → SIGNATURE_TYPE + DEPOSIT_WALLET_ADDRESS. |
| Doctor: no allowance | Place one tiny manual trade on polymarket.com once, rerun Doctor. |
| Live order "rejected" | Normal FOK life — the book moved. The bot logs it and retries on the next opportunity. Frequent rejections = raise SLIPPAGE_CENTS slightly. |
| Status "SAFE MODE" | Repeated errors paused new entries for a minute. Exits and settlement keep running. Check logs. |
| Settings don't apply | Click Apply & Restart in the yellow banner (launchers auto-restart on exit code 42). |
Unknown, and anyone who says otherwise is selling you a dream. What this software guarantees: correct order handling (true Fill-or-Kill, no phantom positions), honest accounting (real fills only, mark-to-market equity, automatic settlement), hard risk caps, and total transparency (every skipped trade tells you why). The edge itself depends on market conditions, competition and your settings — that is exactly why paper mode exists and why position sizes are tiny by default.
Niche focus is part of the edge. One asset, one data source, two window sizes, deterministic market discovery — fewer moving parts, faster loop, easier to reason about.
Polymarket may apply taker fees on some crypto markets; the model subtracts FEE_BUFFER_CENTS from every edge before deciding. If you have a builder code, set BUILDER_CODE.
Closely but not perfectly: paper fills are simulated against the real orderbook with FOK semantics, but it cannot model your own market impact or queue position. Paper settlement uses the official resolution when available, Binance open-vs-close otherwise — tiny disagreements near a tie are possible.
The bot needs a computer or VPS, but the dashboard works fine from a phone browser pointed at your machine/tunnel.
It stays in your local .env, never appears in logs (redacted), can never be read or changed through the dashboard API, and signs orders locally. The dashboard listens on 127.0.0.1 by default.
.env. Set a dashboard password on any shared or remote machine.PolyBTC Clockwork PRO v2.0.0 · © 2026 MetaQuantUniverse · Not affiliated with Polymarket or Binance.