MetaQuantUniverse · v2.0.0

PolyBTC Clockwork PRO

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.

Honest line, before anything else. This is professional trading software, not a money printer. It gives you a clean pricing model, strict risk rails, full visibility and automation — whether the edge is profitable in your market conditions is something you verify in paper mode. Anyone promising guaranteed profits is lying to you.

Contents

  1. Quick start — 3 double-clicks
  2. The Setup Wizard
  3. The Doctor (preflight checks)
  4. Dashboard tour
  5. How the strategy works
  6. What happens at expiry (settlement)
  7. Going live — checklist
  8. Wallet cases A / B / C
  9. Every risk setting, in plain words
  10. Maker mode (advanced, experimental)
  11. Telegram alerts
  12. Running 24/7 (VPS & Docker)
  13. Troubleshooting
  14. FAQ
  15. Safety & legal

1 · Quick start — 3 double-clicks

1
Install Node.js LTS once from https://nodejs.org (big green button, Next-Next-Finish).
2
Double-click INSTALL_WINDOWS.bat. It checks Node, creates your config, installs everything.
3
Double-click 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.

Paper mode = zero risk. No wallet, no key, no real orders. The bot reads the real Polymarket orderbooks and real BTC prices but pays with a virtual $1,000. Let it run for days. Watch the win rate. Only then think about live.

2 · The Setup Wizard

Opens automatically the first time (or via ⚙ Setup Wizard). Five small steps:

  1. Language & mode — EN/FR interface, Paper or Live.
  2. Account type (live only) — the A/B/C question, see Wallet cases.
  3. Keys (live only) — paste your private key (and deposit address if needed). Stored only in your local .env.
  4. Protection level — Cautious (recommended) or Standard preset, optional dashboard password, optional Telegram.
  5. Final check — Save → run the Doctor → Apply & Restart. The page reloads itself; press ▶ START.

3 · The Doctor

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:

CheckWhat it verifies
Node.js version20 or newer
Data foldersdata/ and logs/ writable
Risk config sanitycaps make sense together
Binance reachableBTC price source online
System clockdrift vs exchange time — critical: market windows are computed from your clock
Polymarket discoverygamma-api reachable
Rolling BTC marketsa live btc-updown window answers on its deterministic slug
Polymarket CLOBorder API online + time drift
Live: credentialskey parses, API creds derive, signer ready
Live: USDC balancebalance visible for your signer/funder pair
Live: allowanceexchange allowance set (fix: one tiny manual trade on polymarket.com)
Live: trading statusaccount not in closed-only mode

4 · Dashboard tour

Status lights

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.

Buttons

ButtonWhat it does
▶ START / ■ STOPRun / pause the engine. Stop also cancels maker quotes.
🩺 DoctorFull preflight report.
🧹 Flatten allCloses every open position at market, right now.
🛑 Kill switchInstantly blocks all new entries (persists across restarts). Exits and settlement keep working.
Reset paperWipes the paper ledger back to the starting balance (bot must be stopped).

Panels

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.

5 · How the strategy works

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.

6 · What happens at expiry (settlement)

7 · Going live — checklist

1
Run paper for at least a few days. Look at win rate AND average P&L per trade in Closed trades.
2
Create and fund your Polymarket account: USDC for trading (start with $50–100, seriously).
3
Run the Wizard → Live → pick your wallet case (below) → paste keys.
4
Doctor must be green — especially USDC balance and allowance. If allowance is missing: place one tiny manual trade on polymarket.com once, rerun Doctor.
5
Start with the Cautious preset ($3/trade, 1 position, $10/day max loss). Use START_LIVE_WINDOWS.bat — it never auto-starts; you press START after reviewing.

8 · Wallet cases A / B / C

Polymarket accounts come in three flavors. The wizard asks one question and configures the signing for you:

CaseYou…Signature typeDeposit address needed?
Asigned up with email / Magic link (most people)1 (proxy)Yes — your Polymarket deposit address
Bconnect MetaMask and your funds sit on that same address0 (EOA)No
Cconnect MetaMask but Polymarket created a smart wallet holding the funds2 (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.

Treat the private key like cash. Anyone who has it has your funds. Never paste it anywhere except this bot's wizard on your own computer — never in Telegram, never to "support".

9 · Every risk setting, in plain words

SettingPlain meaningDefault
MAX_TRADE_USDBiggest single bet$5
MAX_OPEN_POSITIONSHow many bets at once2
MAX_POSITION_USD_PER_MARKETTotal exposure on one window$12
MAX_DAILY_TRADESAnti-overtrading cap25
MAX_DAILY_LOSS_USDDaily circuit breaker — hits it, no more entries today$20
MIN_EDGE_CENTSHow "wrong" the market must be before betting
LATE_MIN_EDGE_CENTSStricter edge in the last minutes
MAX_SPREAD_CENTSSkip sloppy books2.5¢
MIN_LIQUIDITY_USDSkip empty books$10
TAKE_PROFIT_CENTS / STOP_LOSS_CENTSExit targets per share+4¢ / −3¢
STOP_TRADING_BEFORE_CLOSE_SECONDSNo fresh entries in the final stretch120s
COOLDOWN_AFTER_STOP_SECONDSBreathe after a stop-loss180s
KILL_SWITCHMaster "no new entries" switchoff

10 · Maker mode experimental · off by default

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.

Market making earns small amounts often and occasionally loses bigger when the market trends through your quotes. The inventory caps exist precisely for that. Watch it in paper for a long time before any live experiment.

11 · Telegram alerts

  1. Message @BotFather/newbot → copy the token.
  2. Message your new bot once, then open https://api.telegram.org/bot<TOKEN>/getUpdates and copy your chat.id.
  3. Paste both in the Wizard (or .env). Choose events with TELEGRAM_NOTIFY (entries, exits, errors, daily, status).

12 · Running 24/7 (VPS & Docker)

13 · Troubleshooting

SymptomFix
"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 redInternet/firewall to Binance. The watchdog reconnects automatically; the bot won't trade meanwhile.
"Markets" light redNo active BTC window found. Run the Doctor — if Polymarket renamed the series, it will tell you to adjust ROLLING_SLUG_PREFIXES.
"Clock" light redEnable automatic time sync in your OS. Critical: windows are computed from your clock.
Doctor: USDC balance $0 in liveWrong wallet case. Recheck A/B/C → SIGNATURE_TYPE + DEPOSIT_WALLET_ADDRESS.
Doctor: no allowancePlace 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 applyClick Apply & Restart in the yellow banner (launchers auto-restart on exit code 42).

14 · FAQ

Will it make money?

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.

Why BTC only?

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.

What fees apply?

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.

Does paper mode mirror live perfectly?

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.

Can I run it on my phone?

The bot needs a computer or VPS, but the dashboard works fine from a phone browser pointed at your machine/tunnel.

Is my key safe?

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.

15 · Safety & legal

PolyBTC Clockwork PRO v2.0.0 · © 2026 MetaQuantUniverse · Not affiliated with Polymarket or Binance.