TWAP-ready · August 7, 2026 cutover

Polymarket TWAP Trading Bot

An open-source polymarket twap trading bot rebuilt for Polymarket's time-weighted average price settlement — tracking 5m, 15m, and 4h windows with Chainlink RTDS feeds and CLOB execution on Polygon.

Node.js ≥ 18 Chainlink TWAP MIT License 5m / 15m / 4h

Why snapshot-era bots break under TWAP

Polymarket crypto Up/Down markets no longer settle on a single price tick. This polymarket trading bot forecasts the projected final average inside each settlement window — the only signal that matters after August 7, 2026.

Per-contract window tracking

Separate state machines for 5m (30s), 15m (60s), and 4h (60s) averaging windows.

Projected-average forecasting

Trade decisions gated on projected final TWAP, not current spot price.

Oracle staleness detection

Sits out windows when Chainlink RTDS feed lag exceeds safety threshold.

Rate-limit budgeting

Traffic budgeted per window to avoid tripping limits during peak volatility.

Features

Production-oriented polymarket twap bot tooling for automated prediction market trading.

CLOB + RTDS integration

Real-time Polymarket order book and Chainlink TWAP oracle feeds.

Multi-window concurrency

Track 5m, 15m, and 4h contracts simultaneously without cross-contamination.

Configurable thresholds

Entry/exit rules against projected TWAP average and market odds.

Backtesting mode

Validate strategies against reconstructed TWAP windows before going live.

Architecture

From Chainlink oracle feed to Polymarket CLOB execution.

┌─────────────────┐     ┌──────────────────┐     ┌───────────────────┐
│ Chainlink RTDS   │────▶│ TWAP Window       │────▶│ Strategy Engine    │
│ (oracle feed)     │     │ Tracker (per      │     │ (projected-average │
│                    │     │ contract type)    │     │ decisioning)       │
└─────────────────┘     └──────────────────┘     └───────────────────┘
                                                              │
                                                              ▼
                                                   ┌───────────────────┐
                                                   │ Polymarket Order   │
                                                   │ Execution Layer    │
                                                   └───────────────────┘

Get the polymarket twap trading bot

Clone, configure, and run against real Polymarket crypto Up/Down markets.

Read the setup guide