poly15m-v5 — Polymarket orderbook signal

Reads Polymarket's own orderbook (mid + depth) instead of Binance price. FOK taker at $0.52 between 120-500s when book mid deviates ≥3¢ from $0.50. Half-Kelly after 10 resolved trades.

Version v1.0.0 · One-time payment · Source code download
Strategy typeScalping
AssetBTC
Timeframe15m
Market typeCrypto binary
Minimum capital$30
Dependencies@polymarket/clob-client, ws, ethers

What it does

poly15m-v5 trades from the Polymarket orderbook, not the Binance tape. When the Up/Down token mid-price has moved ≥3¢ off $0.50 and the bid/ask depth on the favored side clears the threshold, the bot fires a FOK taker at $0.52 in the direction the market-makers are already leaning.

The edge

Binance moves are public information that everyone has equal access to. The Polymarket book reflects a tighter signal: it's where market-makers have committed capital after watching Binance plus everything else they have access to (futures basis, options skew, CVD, on-chain flow). Following the MM-aggregated consensus is "free alpha" in the sense that someone else paid for the signal generation.

The trade-off is that v5 enters later than v1 because it waits for the book to commit. Later entries at slightly worse prices, but with a higher hit rate.

How it works

  1. Connect to Binance + Coinbase + Kraken WebSockets (used only for resolution sanity-check, not entry signal)
  2. Book refresh: poll the Polymarket REST orderbook every 30 seconds (POLY_BOOK_REFRESH_SEC)
  3. Compute: book mid (midpoint of best bid + best ask on the favored side), and depth imbalance (bid_size − ask_size as a fraction)
  4. Signal: book mid ≥ $0.53 OR ≤ $0.47 (3¢ deviation, POLY_MID_THRESHOLD = 0.03) AND depth imbalance ≥ POLY_DEPTH_THRESHOLD (0.10)
  5. Trend filter: look at the last 5 resolved outcomes; if 3 or more went one direction, double the required mid-deviation when going against the streak (TREND_CONTRA_MULTIPLIER = 2.0)
  6. Entry window: 120s to 500s into the candle
  7. FOK taker at $0.52
  8. Sizing: rolling half-Kelly starting after 10 resolved trades (KELLY_MIN_TRADES = 10), capped at 3-20% of balance, hard cap --max-bet $10
  9. Hold to resolution

Sample output

[25/05/2026, 15:30:14] Binance connected [25/05/2026, 15:30:14] Coinbase connected [25/05/2026, 15:30:14] Kraken connected [25/05/2026, 15:32:48] Book mid Up=$0.54 depth_imb=+0.18 trend=2/5 — entering [25/05/2026, 15:32:48] BUY (FOK) 14sh Up @ $0.52 ($7.39 incl fee) [25/05/2026, 15:32:48] Filled: 0xc7a2... [25/05/2026, 15:45:01] Resolved WIN | +$6.61 | Bal: $36.61

Design targets

Break-even at $0.52 entry: required WR ≈ 52.7%. Design target 55-58% realized WR through the book + depth filter, with the trend filter preventing the worst-streak losses.

Trade rate is lower than v1/v2: only 8-15% of candles produce a book signal that clears both thresholds, so 8-15 trades per day under continuous coverage.

What's included

  • poly15m/poly15m-v5.js
  • poly15m/run.sh
  • polymarket-limits.js
  • README with Kelly sizing notes and trend filter customization

Configuration

FlagDefaultDescription
--asset BTCBTCAsset to trade. BTC supported at launch.
--livePlace real orders. Default is dry-run.
--sim-balance 3030Starting balance in dry-run mode (USD).
--max-bet 1010Hard cap per trade in USD.
--max-loss 00Daily loss limit in USD. 0 = disabled.

Related bots