[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112772":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":15,"starSnapshotCount":15,"syncStatus":17,"lastSyncTime":47,"discoverSource":48},112772,"Polymarket-Prediction-Bot","zacharias80\u002FPolymarket-Prediction-Bot","zacharias80","Polymarket trading bot for prediction markets — browse CLOB markets, watch the order book in the terminal, run edge detection, liquidity provision and cross-market arbitrage strategies with paper trading and risk limits. Educational open-source toolkit — not financial advice. Unofficial community project, not affiliated with Polymarket.","",null,"Python",93,19,91,0,1,2,44.6,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"15min","ai-forecasting-polymarket","ai-trading-polymarket","autotrader-polymarket","llm-polymarket","market-analysis-polymarket","market-predictions","poly","polymarket-api-wrapper","polymarket-bot-free","polymarket-event-trading-bot","polymarket-market-trading-bot","polymarket-prediction-engine","polymarket-prediction-market-trading","polymarket-rust","prediction-bot-polymarket","prediction-market-ai-bot-polymarket","prediction-market-polymarket","prediction-market-wiki","trading-engine-polymarket","2026-11-24 04:01:32","# Polymarket-Prediction-Bot\nPolymarket trading bot for prediction markets — browse CLOB markets, watch the order book in the terminal, run edge detection, liquidity provision and cross-market arbitrage strategies with paper trading and risk limits. Educational open-source toolkit — not financial advice. Unofficial community project, not affiliated with Polymarket.\n\u003Cdiv align=\"center\">\n\n# 🔮 Polymarket Prediction Bot\n\n### Polymarket trading bot for prediction markets — CLOB order book, edge detection and arbitrage signals in your terminal.\n\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.11+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n[![Textual](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTUI-textual-7C3AED.svg)](https:\u002F\u002Ftextual.textualize.io\u002F)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](.\u002FLICENSE)\n[![Polymarket](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPolymarket-CLOB-5B5BD6.svg)](https:\u002F\u002Fpolymarket.com\u002F)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](.\u002FREADME.md)\n\n**Browse CLOB markets · watch the book · run probability-edge & liquidity strategies · track USDC.**\n\n\u003C\u002Fdiv>\n\n---\n\n## 📖 Overview\n\n**Polymarket Prediction Bot** is a **Polymarket trading bot for prediction markets** — a\nkeyboard-driven **terminal dashboard** for [Polymarket](https:\u002F\u002Fpolymarket.com\u002F), the\n**Polygon-based prediction market** with a central-limit order book (CLOB) and USDC\nsettlement. It bundles a markets browser, a live CLOB order-book view, a strategy engine\nand a position\u002Ffill tracker into one pane — a complete **Polymarket CLOB API client\n(REST + WebSocket)** in your terminal.\n\nPolymarket shares resolve YES\u002FNO to $1\u002F$0 on real events: elections, crypto milestones,\nsports, macro prints. Pricing a share *is* pricing a probability — the bot runs **edge\ndetection and liquidity provision strategies** against a fair-probability model, surfaces\n**cross-market arbitrage signals (YES+NO spread, multi-outcome)**, and keeps **position\ntracking and PnL history** with **risk limits and exposure controls**. A **paper trading\nmode with virtual USDC balance** lets you iterate safely. **Terminal UI built with Textual\nand Rich** — an **educational open-source toolkit, no financial advice**.\n\n> ⚠️ Paper-trade by default. `--demo` simulates fills against a bundled dataset. Live order\n> placement requires your own Polymarket API credentials and is gated behind explicit\n> configuration.\n\n---\n\n## ✨ Features\n\n| Area | What you get |\n|------|--------------|\n| 🔍 **Markets browser** | Filter by volume, spread, time-to-resolve, category (GAMMA). |\n| 📖 **CLOB book** | YES\u002FNO bids\u002Fasks, spread, mid, book imbalance. |\n| 🧠 **Strategy engine** | Probability-edge vs. a fair-probability model, book-imbalance, liquidity. |\n| 💼 **Positions** | Open YES\u002FNO size, avg cost, uPnL in USDC, resolution countdown. |\n| 🧾 **Fill log** | CLOB fills, cancels, signals — local paper trail. |\n| 🎛️ **Dashboard** | Top movers, widest spreads, soonest-to-resolve, signal queue. |\n| ⌨️ **Keyboard-first** | Vim bindings, `\u002F` filter, `b` book, `s` scan, `o` order. |\n| 🌑 **Theming** | Multiple palettes. |\n\n---\n\n## 🖥️ Screenshots\n\n```\n ╔══════════════════════════════════════════════════════════════════════════════════════════╗\n ║ 🔮 Polymarket Bot        [1]Dash [2]Markets [3]Book [4]Strategy [5]Positions [6]Log      ║\n ╠══════════════════════════════════════════════════════════════════════════════════════════╣\n ║ Wallet: paper · 12,000 USDC   Open: 4,280 USDC   Day P&L: +312 USDC   Signals: 4         ║\n ║ ────────────────────────────────────────────────────────────────────────────────────── ║\n ║  Slug                       Market                          Price  Vol      Resolve      ║\n ║  btc-100k-by-eoy            Will BTC hit $100k by EOY       0.31   3.1M     165d         ║\n ║  fed-cut-sep                Fed cuts rates in Sep           0.68   8.4M     59d          ║\n ║  eth-4k-july                ETH above $4k in July           0.12   1.2M     12d          ║\n ║  us-recession-2026          US recession in 2026            0.42   2.7M     198d         ║\n ║                                                                                         ║\n ║  STRATEGY SIGNALS                       BOOK: btc-100k-by-eoy                              ║\n ║  ◆ fed-cut-sep    PROB-EDGE   conf .74   YES  bid .29  ask .33  spread 4.0¢             ║\n ║  ▲ eth-4k-july    IMBALANCE   conf .61   NO   bid .67  ask .71  spread 4.0¢             ║\n ║  ◆ btc-100k-eoy   PROB-EDGE   conf .69   imbalance: 61% YES                              ║\n ║                                                                                         ║\n ║  q Quit  \u002F Filter  b Book  s Scan  o Order  t Theme  ? Help                            ║\n ╚══════════════════════════════════════════════════════════════════════════════════════════╝\n```\n\n---\n\n## 🚀 Quick start\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzacharias80\u002FPolymarket-Prediction-Bot.git\ncd Polymarket-Prediction-Bot\npip install -r requirements.txt\n\npython main.py --demo     # paper-trade bundled dataset\npython main.py            # live mode (needs API credentials)\n```\n\nOne-click launchers (no system Python required — they unpack a bundled standalone\ninterpreter on first run):\n\n```batch\nrun.bat        :: Windows\n```\n```bash\nchmod +x run.sh && .\u002Frun.sh    # Linux \u002F macOS\n```\n\n## ⚙️ Live mode credentials\n\n```toml\n# ~\u002F.polymarket-bot\u002Fconfig.toml\n[auth]\nprivate_key   = \"0x…\"          # Polygon EOA private key (chmod 0600!)\nproxy_address = \"0x…\"          # Polymarket proxy\u002Fsigner address\napi_key       = \"…\"\napi_secret    = \"…\"\napi_passphrase= \"…\"\nendpoint      = \"https:\u002F\u002Fclob.polymarket.com\"\n```\n\nCredentials are read only from the config file (mode 0600). Never commit them.\n\n---\n\n## ⌨️ Keybindings\n\n| Key | Action |\n|-----|--------|\n| `1`–`6` | Dash · Markets · Book · Strategy · Positions · Log |\n| `\u002F` | Filter markets |\n| `Enter` \u002F `b` | Open CLOB book for the selected market |\n| `s` | Run the strategy engine across the watchlist |\n| `o` | Compose a paper order |\n| `t` | Cycle theme |\n| `q` | Quit |\n\n---\n\n## 🧠 Strategy engine\n\nBuilt-in strategies (selectable, composable):\n\n- **Probability-edge** — compares market price to a fair-probability model and signals when\n  the edge exceeds a threshold.\n- **Book-imbalance** — large YES\u002FNO size skew as a directional cue.\n- **Liquidity** — wide-spread mean-reversion toward mid.\n\nEach signal carries a confidence `0..1` and a suggested side. The bot logs every signal; in\nlive mode you wire a strategy to an order template.\n\n---\n\n## 🗂️ Project layout\n\n```\npolymarket-prediction-bot\u002F\n├── main.py               # Entry point (unpacks bundled runtime on first launch)\n├── polymarket_bot\u002F       # Host package\n│   ├── __main__.py       # `python -m polymarket_bot` entry\n│   ├── cli.py            # argparse + launch\n│   ├── config.py         # Config loader (TOML)\n│   ├── core\u002F             # models, strategy engine, mock data\n│   └── tui\u002F              # Textual app: screens, widgets, styles\n├── support\u002F              # Runtime support library\n├── requirements.txt\n├── run.bat \u002F run.sh      # One-click launchers\n└── release\u002F              # Pre-compiled binaries (planned)\n```\n\n---\n\n## 🔒 Security & responsible use\n\n- **Paper-trade by default.** `--demo` never touches your wallet.\n- **Keys local only**, mode 0600, never logged.\n- **Risk controls**: max USDC exposure, per-market cap, daily loss limit.\n\n---\n\n## ❓ FAQ\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Is Polymarket available in my region?\u003C\u002Fb>\u003C\u002Fsummary>\n\nPolymarket restricts access in some jurisdictions (notably the US). This bot does not bypass\ngeofencing — check Polymarket's terms for your region.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Does it place real orders?\u003C\u002Fb>\u003C\u002Fsummary>\n\nOnly in live mode with your own credentials. By default it runs in paper mode and logs\nsignals and simulated fills. Start with `--demo`.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Is this affiliated with Polymarket?\u003C\u002Fb>\u003C\u002Fsummary>\n\nNo. Independent, unofficial community project. Polymarket is a third-party protocol.\n\u003C\u002Fdetails>\n\n---\n\n## ⚠️ Disclaimer\n\nThis is an **unofficial community project**, **not affiliated with, endorsed by, or\nsponsored by Polymarket**. **Not financial advice.** Trading prediction markets involves\nrisk of loss; no strategy in this repository is guaranteed to make money.\n\n---\n\n## 📄 License\n\nMIT — see [`LICENSE`](.\u002FLICENSE).\n\n\u003Cdiv align=\"center\">\u003Csub>Built for traders who price probabilities on-chain.\u003C\u002Fsub>\u003C\u002Fdiv>\n","这是一个面向Polymarket预测市场的开源交易机器人工具，专为CLOB（中央限价订单簿）架构设计。核心功能包括终端内实时浏览市场与订单簿、基于概率模型的边缘检测、流动性供给策略、跨市场套利信号识别（如YES\u002FNO价差、多结果事件），并支持纸面交易、风险限额控制和USDC盈亏追踪。技术上采用Python实现，基于Textual构建交互式TUI，集成Polymarket REST\u002FWebSocket API。适用于学习预测市场机制、验证交易策略逻辑或在受控环境中开展教育性实操，不提供金融建议。","2026-11-20 04:44:46","CREATED_QUERY"]