[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76048":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":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":41,"readmeContent":42,"aiSummary":43,"trendingCount":15,"starSnapshotCount":15,"syncStatus":44,"lastSyncTime":45,"discoverSource":46},76048,"polymarket-ai-trading","thinkpixelIab\u002Fpolymarket-ai-trading","thinkpixelIab","Polymarket prediction markets AI trading paper trading OpenAI GPT CLOB Kelly mean reversion SQLite Node Express Docker Render Vercel dashboard algorithmic trading quant research forecasting crypto","https:\u002F\u002Fgithub.com\u002FthinkpixelIab\u002Fpolymarket-ai-trading",null,"HTML",70,4340,1,0,25,10,false,"main",[21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"ai-trading","algorithmic-trading","clob","cryptocurrency","dashboard","docker","express","forecasting","gpt","machine-learning","mean-reversion","nodejs","openai","paper-trading","polymarket","prediction-markets","render","sqlite","trading-bot","vercel","2026-06-12 02:03:39","# Polymarket AI Trading System\n\n[![GitHub Org](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Forg-thinkpixelIab-181717?logo=github)](https:\u002F\u002Fgithub.com\u002FthinkpixelIab)\n[![Node](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D20-brightgreen)](https:\u002F\u002Fnodejs.org)\n\n**Paper-only trading tools** for [Polymarket](https:\u002F\u002Fpolymarket.com): mean-reversion ideas from research, optional OpenAI scoring, Kelly-style sizing, and a dashboard to watch everything — **no real money moves through this repo by default.**\n\n| | |\n|---|---|\n| **Repository** | **[github.com\u002FthinkpixelIab\u002Fpolymarket-ai-trading](https:\u002F\u002Fgithub.com\u002FthinkpixelIab\u002Fpolymarket-ai-trading)** |\n| **Try the dashboard** | [polymarket-trading-dashboard.vercel.app](https:\u002F\u002Fpolymarket-trading-dashboard.vercel.app) |\n| **Stack** | Node.js (Express) · OpenAI · SQLite · static dashboard (Vercel) |\n\nCredit: originated by [b1rdmania](https:\u002F\u002Fgithub.com\u002Fb1rdmania); upstream [HKUDS-AI](https:\u002F\u002Fgithub.com\u002FHKUDS-AI) · [@jeanbro7](https:\u002F\u002Fgithub.com\u002Fjeanbro7). **This fork:** [thinkpixelIab](https:\u002F\u002Fgithub.com\u002FthinkpixelIab).\n\n---\n\n## Start here (pick your path)\n\n| If you want to… | Do this |\n|-----------------|--------|\n| **See it running** | Open the **[live dashboard](https:\u002F\u002Fpolymarket-trading-dashboard.vercel.app)** — green connection dot means the backend is reachable. |\n| **Run it on your machine** | Follow **[Quick start (local)](#quick-start-local)** — Docker + `.env` + OpenAI key. |\n| **Host it 24\u002F7** | Use **[Deploy on Render](#deploy-on-render)** (~\\$7\u002Fmo for always-on; free tier may sleep). |\n| **Read step-by-step docs** | Open **[Getting started](docs\u002Fguides\u002Fgetting-started.md)** or the **[docs index](docs\u002F)**. |\n\n---\n\n## Table of contents\n\n- [Who this is for](#who-this-is-for)\n- [What you get](#what-you-get)\n- [Current status](#current-status)\n- [How the pieces fit together](#how-the-pieces-fit-together)\n- [Trading models (simple view)](#trading-models-simple-view)\n- [Quick start (local)](#quick-start-local)\n- [Deploy on Render](#deploy-on-render)\n- [Documentation map](#documentation-map)\n- [Research background](#research-background)\n- [Toolkit modules](#toolkit-modules)\n- [Dashboard](#dashboard)\n- [Docker details](#docker-details)\n- [Safety & secrets](#safety--secrets)\n- [Monitoring](#monitoring)\n- [Contributing](#contributing)\n- [Links](#links)\n- [Disclaimer](#disclaimer)\n\n---\n\n## Who this is for\n\n- You’re curious about **prediction markets** and want a **research-style, paper** setup.\n- You’re OK with **Node.js**, **Docker** (for the full stack), and **environment variables**.\n- You understand this is **not** a “plug in a wallet and print money” project — it’s for learning, experimentation, and **simulated** P&L.\n\n---\n\n## What you get\n\nIn plain terms:\n\n- **Live Polymarket data** (CLOB API) wired into a small **Node\u002FExpress** service.\n- **Three parallel “personalities”** — Conservative, Moderate, Aggressive — same mean-reversion idea, different risk knobs (still **paper**).\n- **Optional AI layer**: OpenAI can help with analysis and **market quality** scoring when you set `OPENAI_API_KEY`.\n- **SQLite** stores history so you can compare models and resolutions over time.\n- **A web dashboard** to watch signals, model stats, and quality scores.\n\n---\n\n## Current status\n\n| | |\n|------------------|-----|\n| **Stage** | Paper trading & research |\n| **Public dashboard** | [polymarket-trading-dashboard.vercel.app](https:\u002F\u002Fpolymarket-trading-dashboard.vercel.app) |\n| **Example backend (hosted)** | [polymarket-trading-system.onrender.com](https:\u002F\u002Fpolymarket-trading-system.onrender.com) |\n\n**Working today**\n\n- Streaming \u002F market data from Polymarket, multi-model paper loop, signals, resolution tracking, embeddings search (with API key), Dockerized layout, dashboard talking to the API.\n\n**Still evolving**\n\n- Deeper backtests, richer history, execution refinements — still **paper-first**.\n\n**Not the focus of this README**\n\n- Live wallet trading, guaranteed profitability, or production-grade custody — treat those as **separate, high-risk** projects.\n\n---\n\n## How the pieces fit together\n\n```\n┌─────────────────────────────────────────┐\n│     Dashboard (static host, e.g. Vercel) │\n│  Tickers · models · signals · AI panels   │\n└─────────────────┬───────────────────────┘\n                  │ HTTP (REST)\n                  ▼\n┌─────────────────────────────────────────┐\n│     Node.js API (Express, e.g. :8000)    │\n│  \u002Fapi\u002Fmodels · \u002Fapi\u002Fsignals\u002Flive · \u002Fapi\u002Fai\u002F*  │\n└─────────────────┬───────────────────────┘\n                  │ SQLite files\n                  ▼\n┌─────────────────────────────────────────┐\n│  Docker: 3 traders + API “dashboard” svc │\n│  (Conservative \u002F Moderate \u002F Aggressive)  │\n└─────────────────┬───────────────────────┘\n                  │ HTTP \u002F WebSocket (Polymarket)\n                  ▼\n┌─────────────────────────────────────────┐\n│           Polymarket CLOB API            │\n└─────────────────────────────────────────┘\n```\n\n---\n\n## Trading models (simple view)\n\nAll three models share the same **mean reversion** idea; they differ mainly in **how bold** they are about entries and sizing (Kelly-style multipliers — still simulated).\n\n| Model | Risk vibe | Rough idea |\n|-------|-----------|------------|\n| **Conservative** | Cautious | Smaller size, higher bar for “this counts as a signal.” |\n| **Moderate** | Balanced | Middle ground on size and confidence. |\n| **Aggressive** | Bold | Larger size, takes weaker-looking setups (monitor closely). |\n\nEverything stays in **paper mode** unless you deliberately build something else.\n\n---\n\n## Quick start (local)\n\n### Prerequisites\n\n- **Docker Desktop** (recommended for the full 4-service setup).\n- **Node 20+** if you run pieces manually ([nodejs.org](https:\u002F\u002Fnodejs.org)).\n- An **OpenAI API key** if you want AI scoring \u002F GPT-assisted bits ([platform.openai.com](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys)).\n\n**Windows note:** `scripts\u002Fdocker.sh` is a **bash** script. Use **Git Bash**, **WSL**, or another bash environment so the commands below work as written.\n\n### Steps\n\n1. **Clone and enter the repo**\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FthinkpixelIab\u002Fpolymarket-ai-trading.git\ncd polymarket-ai-trading\n```\n\n2. **Configure environment**\n\n```bash\ncp .env.example .env\n# Edit .env — at minimum set:\n# OPENAI_API_KEY=sk-...\n```\n\nNever commit `.env`. It should stay gitignored.\n\n3. **Start with Docker** (full stack)\n\n```bash\nbash scripts\u002Fdocker.sh start\nbash scripts\u002Fdocker.sh status    # optional: see services\nbash scripts\u002Fdocker.sh logs      # optional: tail logs\nbash scripts\u002Fdocker.sh smoke     # optional: sanity checks\n```\n\n4. **Open the app**\n\n- API + bundled UI: **http:\u002F\u002Flocalhost:8000**\n\n**npm (optional, lighter exploration)**\n\nFrom the repo root, `package.json` also exposes helpers such as `npm run api` (API only) and `npm run dev:frontend` (static frontend on port 3000). Use these when you already know which piece you need; Docker is still the smoothest path for “everything at once.”\n\n---\n\n## Deploy on Render\n\nGood when you want the backend **always online** without your laptop open.\n\n- **Typical cost:** about **\\$7\u002Fmonth** for always-on (free tiers may spin down after idle).\n- **Outline:** Render Dashboard → **New** → **Blueprint** → connect **`thinkpixelIab\u002Fpolymarket-ai-trading`** → add **`OPENAI_API_KEY`** → apply.\n\n**More detail:** [RENDER_QUICKSTART.md](RENDER_QUICKSTART.md) · [RENDER_DEPLOY.md](RENDER_DEPLOY.md) · [docs\u002Fdeployment\u002Frender-quickstart.md](docs\u002Fdeployment\u002Frender-quickstart.md)\n\n---\n\n## Documentation map\n\n**[Full docs folder →](docs\u002F)**\n\n| I want to… | Open |\n|------------|------|\n| Set up from zero | [Getting started](docs\u002Fguides\u002Fgetting-started.md) |\n| Understand paper mode | [Paper trading](docs\u002Fguides\u002Fpaper-trading.md) |\n| Run backtests | [Backtesting](docs\u002Fguides\u002Fbacktesting.md) |\n| Docker locally | [Docker](docs\u002Fdeployment\u002Fdocker.md) |\n| Production on Render | [Render quickstart](docs\u002Fdeployment\u002Frender-quickstart.md) |\n| Frontend hosting | [Vercel](docs\u002Fdeployment\u002Fvercel.md) |\n\n---\n\n## Research background\n\nThis project borrows ideas from **prediction-market** and **behavioral** literature — e.g. favorite\u002Flongshot dynamics (**Berg & Rietz**), cognitive bias framing (**Munger**), and practical Polymarket context from traders such as **@the_smart_ape**.  \n\nPrimary references and notes live under [`research\u002F`](research\u002F).\n\n---\n\n## Toolkit modules\n\n| Module | Role |\n|--------|------|\n| **polymarket-data** | Fetch and normalize market data |\n| **mean-reversion** | Signal logic around mispriced-ish probabilities |\n| **execution-engine** | Trade lifecycle (paper today) |\n| **volatility-alerts** | Notable move detection |\n| **whale-tracker** | Large-position tracking (partial) |\n\n---\n\n## Dashboard\n\nYou’ll find:\n\n- **Model comparison** (three profiles side by side)\n- **Live signals** with strength hints\n- **Market quality** scores (liquidity, spread, activity, clarity)\n- **AI insights** when OpenAI is configured\n- **Resolution tracking** and **semantic search** over markets\n\nImplementation sketch: vanilla JS in `vercel-frontend\u002Fpublic`, API in `src\u002Fserver.mjs`, trader loop in `src\u002Ftrader.mjs`, YAML under `config\u002F`, SQLite under `data\u002F`.\n\n---\n\n## Docker details\n\nFour services typical layout:\n\n- **conservative** \u002F **moderate** \u002F **aggressive** — trader processes  \n- **dashboard** — Express API + web UI (port **8000**)\n\nShared folders:\n\n- `.\u002Fdata` — SQLite  \n- `.\u002Flogs` — logs  \n- `.\u002Fconfig` — model YAML  \n\nHealth checks hit trader processes and `GET \u002Fapi\u002Fhealth` on the API container. Containers are set to restart on failure.\n\n---\n\n## Safety & secrets\n\n**Paper mode (default path)**\n\n- No on-chain sends from this repo’s happy path  \n- No wallet keys required to experiment  \n- Keep keys only in `.env`\n\n**If you ever pursue live trading**\n\nTreat that as a **new** security project: custody, kill switches, limits, monitoring, and legal\u002Fcompliance review — not something this README endorses out of the box.\n\n**Never commit**\n\n- `OPENAI_API_KEY`  \n- `POLYGON_PRIVATE_KEY` or any live wallet secret  \n\n---\n\n## Monitoring\n\nWorth watching on the dashboard:\n\n- **Trades \u002F win rate \u002F paper P&L** per model  \n- **Market quality** subscores  \n- **Backend** connectivity (green = talking to API)  \n- **Host health** if self-hosting (Docker\u002FRender uptime, disk for SQLite)\n\n**URLs**\n\n- Local: `http:\u002F\u002Flocalhost:8000`  \n- Public UI: [polymarket-trading-dashboard.vercel.app](https:\u002F\u002Fpolymarket-trading-dashboard.vercel.app)\n\n---\n\n## Contributing\n\nWelcome:\n\n- Bug reports and fixes  \n- Doc improvements  \n- Research notes and careful strategy discussion  \n\nPlease:\n\n- Avoid PRs that **enable live trading** without strong safety review  \n- Keep **secrets** out of git  \n\nForks and experiments encouraged — stay in **paper** until you genuinely trust your setup.\n\n---\n\n## Links\n\n- **Repo:** [github.com\u002FthinkpixelIab\u002Fpolymarket-ai-trading](https:\u002F\u002Fgithub.com\u002FthinkpixelIab\u002Fpolymarket-ai-trading)  \n- **Org:** [github.com\u002FthinkpixelIab](https:\u002F\u002Fgithub.com\u002FthinkpixelIab)  \n- **Dashboard:** [polymarket-trading-dashboard.vercel.app](https:\u002F\u002Fpolymarket-trading-dashboard.vercel.app)  \n- **Polymarket:** [polymarket.com](https:\u002F\u002Fpolymarket.com)  \n- **Original author:** [@b1rdmania](https:\u002F\u002Fgithub.com\u002Fb1rdmania)\n\n### Related projects\n\n- [Canton Prediction Markets](https:\u002F\u002Fgithub.com\u002Fb1rdmania\u002Fcanton-prediction-markets)  \n- [Aztec Auction Analysis](https:\u002F\u002Fgithub.com\u002Fb1rdmania\u002Faztec-auction-analysis)\n\n---\n\n## Disclaimer\n\n**Educational and research use.** Not financial advice. Paper results ≠ live results. Prediction markets can lose money. Use only what you can afford to lose; no warranty.\n","该项目是一个基于Polymarket预测市场的AI交易系统，用于模拟交易。其核心功能包括均值回归策略、可选的OpenAI评分机制、凯利准则资金管理以及一个实时监控的仪表盘。技术上，它利用了Node.js (Express)作为后端服务框架，SQLite数据库存储数据，并通过Docker容器化部署，支持Vercel上的静态仪表盘展示。适合对预测市场感兴趣的用户进行研究与实验性学习，在不涉及真实资金的情况下测试和优化交易策略。",2,"2026-06-11 03:54:19","CREATED_QUERY"]