Polymarket Arbitrage Trading Bot
Polymarket arbitrage trading bot tool for BTC and ETH 5-minute prediction markets with automated execution, real-time analytics, and smart wallet copy trading. Polymarket trading bot Polymarket trading bot Polymarket trading bot Polymarket arbitrage trading bot Polymarket trading bot Polymarket trading bot Polymarket trading bot Polymarket
Install / Use
npx skills add radioman/polymarket-arbitrage-trading-botInstalls into whichever agent you are using.
README
Polymarket arbitrage bot
Advanced analytics and signal engine for prediction market trading on Polymarket.
(🌟click! so your polymarket account will be boosted)<a href="https://polymarket.com/?r=cryptoking1106"><img width="745" height="93" alt="image" src="https://github.com/user-attachments/assets/746d4631-5b96-4fe9-b955-afedf971256c" /></a>
Built for:
- arbitrage detection
- market inefficiency analysis
- real-time trading signals
- spread monitoring
- execution optimization
- automated trading workflows
The system continuously tracks market movements, liquidity, volatility, and pricing inefficiencies to identify high-probability trading opportunities across prediction markets.
Features
- Real-time arbitrage detection
- Smart trading signals
- Advanced analytics dashboard
- AI-assisted trade optimization
- Position and PnL tracking
- Risk management tools
- Telegram integration
- Automated execution support
Designed specifically for fast-moving prediction markets and high-frequency trading environments.
<img width="1917" height="893" alt="Screenshot 2026-05-18 031019" src="https://github.com/user-attachments/assets/f45c8109-6500-4c64-bb22-31297657f20e" /> <img width="1861" height="881" alt="Screenshot 2026-05-18 011706" src="https://github.com/user-attachments/assets/d46676ea-5f88-482e-91d4-e81aeef2f6df" /> <img width="1893" height="769" alt="Screenshot 2026-05-18 011723" src="https://github.com/user-attachments/assets/3cd99752-bc90-4bda-9c69-a1228251d1cb" /> ---🟢 New Prediction Market Platform
Explore the new prediction market platform by GMGN:
Future News is a prediction market platform focused on trading real-world events with wallet-connected execution and real-time market data. <img width="1487" height="767" alt="image" src="https://github.com/user-attachments/assets/2a6555b2-18d8-44e7-908d-06b2a6e621e2" />
Quick start
Terminal 1 — dashboard
npm start
Open http://localhost:3847
Terminal 2 — paper bot
npm run demo
Edit config/demo-bot.json (your live settings). Use config/demo-bot.example.json as a conservative starter template.
| File | Purpose |
|------|---------|
| config/demo-bot.json | Active strategy + bankroll (what npm run demo loads) |
| config/demo-bot.example.json | Example / reset template (lower risk defaults) |
| data/demo-bot/state.json | Virtual balance, positions, trade history |
| data/demo-bot/trades.log | Text log of bot decisions |
Reset virtual account: delete data/demo-bot/state.json and restart npm run demo.
Switch strategy
Set strategy.name in config/demo-bot.json and restart npm run demo.
All other strategy numbers are loaded automatically from config/strategies/<name>.json (e.g. btc_and_odds → btc-and-odds.json).
Override any single field in demo-bot.json if you want (preset + your value wins):
"strategy": {
"name": "btc_or_odds",
"betSizeUsdc": 15
}
Trade only Up or only Down (tradeLeg applies to every strategy):
| tradeLeg | Effect |
|------------|--------|
| "both" (default) | Buy Up or Down when conditions pass |
| "up" | Only enter Up; Down signals → HOLD |
| "down" | Only enter Down; Up signals → HOLD |
"strategy": {
"name": "btc_and_odds",
"tradeLeg": "down"
}
For btc_and_odds, Up needs BTC ≥ beat + $threshold and Up odds ≥ min; Down needs BTC ≤ beat − threshold and Down odds ≥ min.
Down not trading? Common causes:
- Old Up position still open — bot shows
HOLD (holding_position)andpos U:34. Restart after fix, or deletedata/demo-bot/state.json. Stale positions are auto-settled on start. - BTC not far enough below beat — e.g. Δ −$9 with Down 89% fails if
minBtcDeltaUsd: 15. Lower to10or set"btcSignOnly": true(only need BTC below beat, not $15). - Down odds > maxEntryOddsPct — e.g. Down 96% with max 88 →
odds_too_high. - Outside entry window —
minSecondsIntoWindow: 200= only last ~100s of the 5m window.
| strategy.name | Buys Up when… | Buys Down when… | Typical use |
|-----------------|---------------|-----------------|-------------|
| btc_momentum (default) | BTC ≥ beat + $threshold, or BTC above beat + Up odds ≥ min | BTC ≤ beat − threshold, or BTC below beat + Down odds ≥ min | Trend + aligned odds (respectBtcOnOddsFallback) |
| odds_favorite | Up is market favorite (≥ minFavoriteOddsPct) | Down is favorite | Ignore BTC; follow Polymarket price |
| btc_and_odds | BTC ≥ +threshold and Up odds ≥ min | BTC ≤ −threshold and Down odds ≥ min | Stricter — both must agree |
| btc_or_odds | BTC ≥ +threshold or Up favorite | BTC ≤ −threshold or Down favorite | More entries than momentum |
| contrarian | Down cheap when Up very expensive | Up cheap when Down very expensive | Fade extremes (minContrarianFavoritePct, maxUnderdogOddsPct) |
| btc_mean_revert | BTC below beat by $threshold (fade Down) | BTC above beat by $threshold (fade Up) | Bet snap-back before close |
Preset JSON blocks (copy strategy into demo-bot.json):
config/strategies/odds-favorite.jsonconfig/strategies/btc-or-odds.jsonconfig/strategies/btc-and-odds.jsonconfig/strategies/contrarian.jsonconfig/strategies/btc-mean-revert.json
Extra fields by strategy
| Field | Used by |
|-------|---------|
| side, respectBtcOnOddsFallback | btc_momentum only |
| minFavoriteOddsPct | momentum fallback, odds_favorite, btc_and_odds, btc_or_odds |
| minBtcDeltaUsd | all BTC-based strategies |
| minContrarianFavoritePct, maxUnderdogOddsPct | contrarian only |
| minEntryOddsPct | optional floor on entry price (any strategy) |
Your active config (config/demo-bot.json)
This is the file the bot reads today:
{
"mode": "paper",
"startingBalanceUsdc": 1000,
"pollIntervalMs": 5000,
"stateFile": "data/demo-bot/state.json",
"logFile": "data/demo-bot/trades.log",
"dashboard": {
"enabled": true,
"label": "Demo Bot",
"address": "0x000000000000000000000000000000000000d30b",
"color": "#22c55e"
},
"strategy": {
"name": "btc_momentum",
"side": "follow_btc",
"betSizeUsdc": 25,
"maxBetsPerWindow": 1,
"minSecondsIntoWindow": 45,
"maxSecondsIntoWindow": 270,
"minBtcDeltaUsd": 20,
"minFavoriteOddsPct": 72,
"maxEntryOddsPct": 95,
"takeProfitOddsPct": 100,
"stopLossOddsPct": 0,
"respectBtcOnOddsFallback": true
}
}
What this preset does
| Setting | Value | Effect |
|---------|-------|--------|
| side | follow_btc | Buy Up/Down from BTC vs price-to-beat; use odds only if BTC is flat |
| minBtcDeltaUsd | 20 | Need ≥ $20 above/below beat for a BTC signal |
| minFavoriteOddsPct | 72 | Odds fallback only if favorite is ≥ 72% (strong market agreement) |
| maxEntryOddsPct | 95 | Can enter up to 95¢ — late, high-confidence entries only |
| takeProfitOddsPct | 100 | Almost never take profit early (odds must hit 100%) |
| stopLossOddsPct | 0 | Almost never stop out early (only if odds ≤ 0%) |
| maxBetsPerWindow | 1 | One paper buy per 5m window |
| betSizeUsdc | 25 | $25 virtual per entry |
In practice: entries need a clear BTC move or very one-sided odds (72%+). After buying, the bot usually holds until window settlement ($1 / $0 per share), not scalping TP/SL. Good for testing “bet the favorite and ride to close.”
Strategy: btc_momentum
Idea: In each 5-minute window, if BTC is clearly above or below the window’s price to beat, buy the side that should win (Up or Down). Optionally exit early on odds (take profit / stop loss); otherwise hold until settlement.
This is for testing — not financial advice.
What the market is
- Each window is 5 minutes.
- Price to beat = BTC at window open (Binance proxy; Polymarket uses Chainlink).
- At window end: Up pays $1/share if BTC ≥ beat; Down pays $1/share if BTC < beat.
- While the window is open, share prices move between ~0¢ and ~100¢ (shown as % on the dashboard).
Signal: which side to buy
Controlled by strategy.side:
| Value | Behavior |
|-------|----------|
| follow_btc | Prefer BTC vs beat; if unclear, use odds |
| follow_odds | Use whichever side has higher implied probability |
follow_btc rules
btcDelta = current BTC − price to beat- If
btcDelta ≥ minBtcDeltaUsd→ target Up - If
btcDelta ≤ −minBtcDeltaUsd→ target Down - Otherwise fall back to odds — only the side that matches BTC direction:
- BTC above beat → may buy Up if
upPct ≥ minFavoriteOddsPct - BTC below beat → may buy Down if
downPct ≥ minFavoriteOddsPct - Will not buy Up on a negative delta just because Up is 60% (that was the old bug)
- BTC above beat → may buy Up if
Set respectBtcOnOddsFallback: false to use pure odds favorite again.
follow_odds rules
- Pick Up if
upPct ≥ minFavoriteOddsPctand Up ≥ Down - Pick Down if
downPct ≥ minFavoriteOddsPctand Down ≥ Up - Otherwise no entry (
no_clear_signal)
Decision flow (each poll)
The bot wakes every pollIntervalMs (default 5s):
flowchart TD
A[Poll live window] --> B{Less than 15s left?}
B -->|yes| HOLD1[HOLD: too close to end]
B -->|no| C{Open position?}
C -->|yes| D{Odds >= takeProfitOddsPct?}
D -->|yes| SELL1[SELL: take profit]
D -->|no| E{Odds <= stopLossOddsPct?}
E -->|yes| SELL2[SELL: stop loss]
E -->|no| HOLD2[HOLD: hold to settlement]
C -->|no| F{In entry time window?}
F -->|too early| HOLD3[HOLD: warmup]
F -->|too late| HOLD4[HOLD: past entry window]
F -->|ok| G{Max bets reached?}
G -->|yes| HOLD5[HOLD: max bets]
G -->|no| H{Clear signal?}
H -->|no| HOLD6[HOLD: no signal]
H -->|yes| I{Entry odds <= maxEntryO
Related Skills
codebase-memory-mcp
38.0kHigh-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
codebase-memory-mcp
38.0kHigh-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
codebase-memory-mcp
38.1kHigh-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
tabularis
4.0kOpen-source desktop SQL workspace for PostgreSQL, MySQL/MariaDB, SQLite and 15+ more databases like DuckDB, ClickHouse, Redis and Firestore. Built-in MCP server for Claude, Cursor and Devin, SQL notebooks and visual EXPLAIN.
