Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Polymarket Arbitrage Bot

A high-performance, type-safe arbitrage engine for Polymarket - built in Node.js + TypeScript.

Detects and executes on YES/NO mispricings, crypto Up/Down markets (BTC, ETH, SOL), and cross-venue inefficiencies in real time.

Node.js TypeScript License: MIT PRs Welcome Status

Polymarket Profile Twitter Follow


Live Dashboard UI

Live arbitrage dashboard
Performance & Opportunities

Performance and opportunity tracking

Table of Contents


Why This Bot

Prediction markets like Polymarket move fast, and pricing inefficiencies between YES/NO legs - or between Polymarket and other venues - tend to close within seconds. This project exists to make that detection-and-execution loop fast, observable, and safe to operate, instead of relying on manual monitoring or fragile scripts.

It's built around three principles:

PrincipleWhat it means in practice
SpeedAsync WebSocket pipelines, no polling where a stream is available
SafetyExplicit exposure limits, slippage guards, and kill-switches before execution
TransparencyEvery trade, signal, and skipped opportunity is logged and inspectable

Features

  • Real-Time Arbitrage Scanner - continuously monitors Polymarket 5-minute Up/Down contracts and other markets for pricing mismatches.
  • Low-Latency Execution Engine - async/await pipelines, persistent WebSocket connections, and optimized RPC batching.
  • Modular Strategy System:
    • Intra-market arbitrage (YES/NO parity breaks)
    • Cross-venue price discrepancies
    • Short-term momentum on crypto Up/Down markets
    • Merge/redeem liquidity optimizer
  • Built-In Risk Management - position sizing, stop logic, slippage protection, and configurable per-market exposure caps.
  • Multi-Channel Alerts - Telegram, Discord, or custom webhooks for fills, errors, and opportunity alerts.
  • Live Dashboard - optional Express + WebSocket UI for real-time P&L, open positions, and opportunity feed.
  • Type-Safe End to End - Zod-validated inputs/outputs across the entire pipeline, so bad data fails loud, not silent.

Tech Stack

LayerTechnology
RuntimeNode.js 20+
LanguageTypeScript
Blockchainethers.js / viem
Market dataPolymarket SDK, REST + WebSocket
QueuingBullMQ
LoggingWinston
ValidationZod
DashboardExpress + WebSocket

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌───────────────────┐
│  Market Data    │────▶│  Signal Engine  │────▶│  Risk Manager     │
│  (WS + REST)    │     │  (strategies)    │     │  (sizing/limits)  │
└─────────────────┘     └──────────────────┘     └─────────┬─────────┘
                                                           │
                          ┌──────────────────┐             ▼
                          │  Notifications   │◀────┌───────────────────┐
                          │ (TG/Discord/Hook)│      │  Execution Engine │
                          └──────────────────┘      │  (ethers/viem)    │
                                                    └───────────────────┘

Quick Start

git clone https://github.com/emreatak0/polymarket-arbitrage-bot-btc-5m.git
cd polymarket-arbitrage-bot
npm install
cp .env.example .env
npm run build
npm run start

Run in dry-run / paper mode first (see Configuration) before connecting a funded wallet.


Configuration

Set these in your .env file:

# Wallet & network
PRIVATE_KEY=your_wallet_private_key
RPC_URL=https://polygon-rpc.com

# Notifications
TELEGRAM_BOT_TOKEN=...
TELEGRAM_CHAT_ID=...

# Risk controls
MAX_POSITION_USD=500
MAX_DAILY_LOSS_USD=100
DRY_RUN=true

Never commit your .env file or share your private key. Consider using a dedicated, minimally-funded wallet for bot operations rather than a primary wallet.


Strategies

StrategyDescription
5-Min Up/Down ArbCore focus on BTC/ETH/SOL short-duration contracts
YES/NO Price DiscrepancyClassic arbitrage when YES + NO < $1
Cross-PlatformCompares Polymarket pricing against other venues
Statistical / MomentumPluggable custom signal layer
Liquidity OptimizationAutomated merge/redeem to free up capital

Each strategy is a self-contained module - enable, disable, or tune thresholds independently in config/strategies.ts.


Risk Management

  • Configurable max position size and max daily loss limits
  • Slippage protection on every execution path
  • Stop logic to halt trading on abnormal market conditions or repeated failed fills
  • Dry-run mode to validate strategy behavior with zero capital at risk

Performance & Transparency

  • Historical run logs are stored in /results for independent review.
  • On-chain wallet activity can be tracked directly on Polygonscan for full transparency - no black-box claims.
  • Results vary by market conditions, latency, and configuration; past logs are not a guarantee of future performance.

Author's Track Record

Rather than quoting a P&L screenshot that goes stale the moment markets move, the maintainer's live Polymarket activity is public and verifiable in real time:

These links show real, current on-chain activity rather than a fixed number in this README - check them directly for up-to-date performance.

Snapshot (as of July 8, 2026):

MetricValue
Predictions made33,753
Positions value$876.57
Biggest win$2,036.37
P&L (past day)+$935.53
Profile views22.7K

This table is a point-in-time snapshot and will not update automatically. For current figures, always check the live profile.


Roadmap

  • Advanced ML signals (TensorFlow.js or external model integration)
  • Rust core for ultra-low-latency execution
  • Expanded market support (politics, sports, perps)
  • Docker + Kubernetes deployment
  • Public API for community-contributed strategies

Contributing

Contributions are welcome. Open an issue or PR for new strategies, bug fixes, or performance improvements. Please include tests and a clear description of the change.

Questions, feedback, or strategy ideas - reach out on X/Twitter or check out live trading activity on Polymarket.


Disclaimer

Automated trading on prediction markets carries substantial risk of loss, including total loss of deployed capital. Smart contract, liquidity, and execution risks all apply. This project is provided as-is, with no guarantee of profitability. This is not financial advice. Start with small sizes, use dry-run mode first, and do your own research.


License

MIT License - free to use and modify with attribution.


Keywords: polymarket arbitrage bot · polymarket arb bot · polymarket trading bot typescript · node.js polymarket bot · prediction market arbitrage · crypto up/down bot · polymarket automation · defi arbitrage bot

关于 About

polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot | polymarket arbitrage bot |
arbitragebtc-5mpolymarketpolymarket-arbitrage-botpolymarket-botpolymarket-trading-bottrading-bot

语言 Languages

JavaScript51.7%
TypeScript48.3%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
35
Total Commits
峰值: 33次/周
Less
More

核心贡献者 Contributors