Dev Release 1
PolyBot Pro shipped — a full YES+NO arbitrage engine with asymmetric sizing, live WebSocket feeds.
PolyBot — Strategy Engine
YES+NO Arbitrage with Asymmetric Sizing — core strategy shipped
Enters when combined YES+NO price is below a configurable threshold (default 92¢), locking in a guaranteed floor profit regardless of outcome.
70 / 30 asymmetric split logic
70% of capital goes to the high-probability leg (e.g. DOWN @ 80¢), 30% to the low-probability leg (e.g. UP @ 6¢). If UP wins, the 25× share count turns a small allocation into outsized upside.
Price boost on the high-prob leg for immediate fill
The high-prob order posts a few ticks above midpoint to cross the spread and fill instantly. The boost is capped so the combined entry never exceeds MAX_COMBINED_PRICE − 2¢, keeping the arb profitable after the premium.
Strict abort logic — no naked positions
If the high-prob leg fails to fill, the low-prob leg is never placed. If high-prob fills but low-prob fails, the high-prob GTC order is cancelled. Clean entries only.
Assets: BTC, ETH, SOL, XRP — intervals: 5m and 15m
One thread per asset+interval combo. Each thread is self-restarting — crashes recover automatically after a 15 s backoff.
PolyBot — Market Infrastructure
Persistent WebSocket to Polymarket CLOB market channel
Sub-millisecond in-memory price reads via MarketStream. Tight-spread midpoint = (bid+ask)/2, wide-spread falls back to last trade price — mirrors Polymarket's own display logic.
Auto-reconnect with exponential backoff (3 s → 30 s max)
Thread-safe per-token locks. Ping keepalive every 20 s. REST fallback for price reads when WebSocket isn't warm.
Gamma API market discovery — finds active windows by slug template
Queries gamma-api.polymarket.com to locate the current 5m/15m window for each asset. Parses YES and NO token IDs from the market response.
CLOB V2 authenticated client — pUSD / proxy wallet support
Signature type 2 for proxy wallets. Reads live pUSD balance from the proxy wallet on startup. Warns if balance < $1 before live trading.
Tick-size aware order pricing (snap to grid, clamp 1¢–99¢)
All prices rounded DOWN to the nearest tick using Decimal arithmetic to avoid float precision bugs at order placement.
PolyBot — Portfolio Management - coming soon
Fractional Kelly Criterion sizing — quarter-Kelly by default
Allocation per window is computed from bankroll, edge, and win probability. Capped at 5% of bankroll per window regardless of Kelly output.
Max 30% total exposure across all concurrent windows
PortfolioManager tracks every open position. New windows are skipped if total deployed capital would exceed the exposure cap.
Daily loss halt — bot stops all entries if drawdown threshold is hit
Configurable via DAILY_LOSS_HALT_PCT. Positions already open are held to resolution.
Guaranteed floor and directional upside tracked per position
Each Position dataclass records combined_entry, guaranteed_floor, matching_shares, high/low fills, and final realized_pnl. Based on wallet analysis: $44K from 6,926 trades (~$6.35 avg per trade).
Periodic snapshot logging — portfolio state every 60 s