poly15m-v4 — Gabagool buy-both-sides on 15-minute BTC

Buy-both-sides Gabagool on 15-minute BTC. Picks up cheap YES + cheap NO at $0.49 or less, locks profit whenever the pair stays below $0.95. Polls books every 2s from 30s to 780s into the candle.

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

What it does

poly15m-v4 (a.k.a. "Gabagool") makes no directional prediction. It accumulates YES shares when YES is cheap and NO shares when NO is cheap. When the average YES price + average NO price falls below $1.00, the position is locked-in profitable regardless of which side eventually wins.

Profit formula:

pnl = min(qty_YES, qty_NO) × $1.00 − (cost_YES + cost_NO)

The edge

In any 15-minute candle, the BTC price oscillates. When BTC rallies, the Up side becomes expensive and the Down side gets cheap, then vice versa. A patient buy-both-sides strategy lifts whichever side the market just discounted. When the average pair-cost stays below $0.95, the bot collects $0.05+ of locked-in margin per matched share at resolution.

The strategy is pure orderbook arbitrage: no Binance, no Chainlink, no momentum. It only watches Polymarket asks.

How it works

  1. Identify the active 15-minute BTC candle and pull both Up and Down token IDs from Gamma API
  2. Poll the orderbook every 2 seconds (POLL_INTERVAL_MS = 2000) starting 30s after candle open
  3. Buy condition: best ask on either side ≤ MAX_BUY_PRICE ($0.49) AND ask size ≥ MIN_ASK_SIZE (5)
  4. Size: 20% of balance per side, capped at MAX_BET_PER_SIDE ($15)
  5. Pair-cost check: only buy if avg_YES + avg_NO would stay below PAIR_COST_TARGET ($0.95)
  6. Cooldown: 3 seconds between buys on the same side (BUY_COOLDOWN_MS)
  7. Stop buying 120 seconds before resolution (ENTRY_END_SEC = 780)
  8. Hold to resolution

Circuit breakers: MAX_CONSEC_LOSSES = 4 triggers 15-min cooldown, MIN_BALANCE = $3.

Sample output

[25/05/2026, 15:30:32] Polymarket WS connected [25/05/2026, 15:31:14] BUY (FOK) 15sh Up @ $0.46 ($6.91 incl fee) [25/05/2026, 15:32:03] BUY (FOK) 15sh Down @ $0.47 ($7.06 incl fee) [25/05/2026, 15:32:03] Pair locked: avg $0.465 + $0.470 = $0.935 (5.5¢ margin) [25/05/2026, 15:45:01] Resolved Down WIN | +$15.00 - $13.97 = +$1.03 | Bal: $31.03

Design targets

Locked-in margin per matched share: at $0.95 pair cost, $0.05 profit per share × 15 matched shares = $0.75. After fees (paid on both buys): roughly $0.40-$0.60 net per locked-in pair. With ~10-20% of candles producing a complete locked pair, expected daily PnL is $4-$12 per $30 of capital deployed.

Worst case: only one side fills. The unmatched side becomes a directional bet at $0.46, which resolves to either $1.00 (win) or $0.00 (loss). Even with no locked pair, ~50% of these one-sided positions win at $0.46 entry = $0.40 expected per share.

FAQ

How does this differ from polydaily?

Same Gabagool idea, different timescale. polydaily applies it to daily BTC markets (threshold + Up/Down) and runs slower polling (60s) over 24-hour windows. poly15m-v4 runs every 15 minutes on the same fast Up/Down book.

What's included

  • poly15m/poly15m-v4.js
  • poly15m/run.sh
  • polymarket-limits.js
  • README with pair-cost tuning and the worked example of a complete locked-in cycle

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-balance 00Cap the balance used for sizing. 0 = use full balance.

Related bots