Skip to main content
Get the Polymarket Bot tracking BTC 5-minute markets in under 5 minutes.
1

Clone and install

git clone <your-repo-url>
cd polymarket-bot
pnpm install
The bot requires only two dependencies:
  • ws - WebSocket client for Chainlink price feed
  • chalk - Terminal UI colors
2

Start tracking

Launch the bot to begin monitoring live BTC markets:
pnpm start
You’ll see the real-time interface with:
  • Live BTC price from Polymarket’s Chainlink oracle
  • Strike price for the current 5-minute interval
  • Model prediction (UP/DOWN with confidence)
  • Market probability vs model probability
  • Expected Value and edge calculations
  • Rolling accuracy stats
3

Watch predictions

The bot updates every second. Each 5-minute interval:
  1. Monitors live BTC price via WebSocket
  2. Fetches strike price from Vatic Trading API
  3. Predicts probability using Black-Scholes + momentum
  4. Compares model vs market to find +EV opportunities
  5. Records 30+ fields including predictions, results, and risk metrics
The bot tracks two prediction snapshots:
  • Early 1m - Captured 60 seconds before close (trading signal)
  • Pr 30s - Captured 30 seconds before close (final prediction)
4

Generate reports

After running for a session, generate a daily performance report:
pnpm report
Or analyze a specific date:
node src/reporter/daily.js 2026-02-23
Reports include:
  • Brier Score (calibration quality)
  • Log Loss and Murphy decomposition
  • Accuracy by confidence bands
  • PnL tracking with Kelly bet sizing
  • Runs test for prediction randomness

Understanding the output

Live header

  GROWTHLY MARKET BOT
+----------------------------------------------------------------------+
|   BTC Price: $64,232.02   Strike: $64,355.45   Time: 2:56   [LIVE]   |
|   Prediction: v DN 85%   ABSTENCION   (insufficient_margin)          |
|   Market: 10.0%  EV: +9.7%  Edge: -8.7pp  [POLY]                     |
|   Bankroll: $100.00  Drawdown: 0.0% [GREEN]  Bet: --  Kelly a: --    |
+----------------------------------------------------------------------+
  • BTC Price - Live price from Chainlink (green if above strike)
  • Strike - Target price for current interval
  • Time - Countdown to interval close
  • Prediction - Model output with confidence (e.g., “v DN 85%” = 85% confident DOWN)

Prediction format

^ UP 80%   →  80% confident it goes UP
v DN 95%   →  95% confident it goes DOWN  
v DN 55%   →  55% confident it goes DOWN (low confidence)

History table

+----+-------------+-------------+---------+-----------+------+------+------+-----------+------+
| #  | Target      | Final       | Result  | Early 1m  | E.Ac | q    | Bet  | Pr 30s    | F.Ac |
+----+-------------+-------------+---------+-----------+------+------+------+-----------+------+
| 60 | $64,119.86  | $64,195.42  | UP      | ^ UP 92%  | OK   | 90%  | --   | ^ UP 71%  | OK   |
| 61 | $64,195.42  | $64,158.04  | DOWN    | v DN 65%  | OK   | 55%  | --   | v DN 98%  | OK   |
| 62 | $64,149.11  | $64,231.85  | UP      | ^ UP 98%  | OK   | 95%  | --   | ^ UP 99%  | OK   |
+----+-------------+-------------+---------+-----------+------+------+------+-----------+------+
  62 resolved | 26 UP | 36 DN | Final: 86% (43/50) | Early 1m: 87% (45/52) | Abstain: 10
ColumnDescription
#Sequential interval number
TargetStrike price for this interval
FinalBTC price at interval close
ResultUP (closed above strike) or DOWN (closed below)
Early 1mPrediction at 60 seconds before close (trading metric)
E.AcEarly accuracy - OK if correct, MISS if wrong
qPolymarket UP token price (market probability)
BetBet size in USD from Kelly criterion
Pr 30sPrediction at 30 seconds before close
F.AcFinal accuracy - OK if correct, MISS if wrong

Next steps

Installation

Detailed setup with Node.js and prerequisites

Configuration

Customize parameters, risk settings, and data feeds

How it works

Black-Scholes models, EWMA volatility, and momentum analysis

Reports

Understanding Brier Score, Murphy decomposition, and performance metrics

Dev mode

Development mode with auto-reload on file changes:
pnpm dev
This runs node --watch src/index.js and automatically restarts the bot when you modify source files.

Build docs developers (and LLMs) love