[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75969":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":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":41,"discoverSource":42},75969,"polymarket-ai-trading","trading-2028\u002Fpolymarket-ai-trading","trading-2028","Polymarket Polymarket AI trading AI trading prediction markets prediction markets paper trading paper trading OpenAI OpenAI Node.js Node.js Express Express Docker Docker CLOB CLOB mean reversion mean reversion dashboard dashboard crypto bot crypto bot SQLite SQLite automated trading automated trading API API research trading research trading","https:\u002F\u002Fgithub.com\u002Ftrading-2028\u002Fpolymarket-ai-trading",null,"HTML",193,3941,1,2,0,51,52.1,false,"main",true,[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"ai-trading","automated-trading","clob","cryptocurrency","dashboard","docker","express","mean-reversion","nodejs","openai","paper-trading","polymarket","prediction-markets","sqlite","trading-bot","2026-06-12 04:01:19","# Polymarket AI Trading System\n\n[![GitHub Org](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Forg-trading--2028-181717?logo=github)](https:\u002F\u002Fgithub.com\u002Ftrading-2028)\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\u002Ftrading-2028\u002Fpolymarket-ai-trading](https:\u002F\u002Fgithub.com\u002Ftrading-2028\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:** [trading-2028](https:\u002F\u002Fgithub.com\u002Ftrading-2028).\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\u002Ftrading-2028\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 **`trading-2028\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\u002Ftrading-2028\u002Fpolymarket-ai-trading](https:\u002F\u002Fgithub.com\u002Ftrading-2028\u002Fpolymarket-ai-trading)  \n- **Org:** [github.com\u002Ftrading-2028](https:\u002F\u002Fgithub.com\u002Ftrading-2028)  \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辅助分析以及Kelly准则的资金管理方法，并通过一个直观的仪表盘展示交易活动。技术栈主要采用Node.js（Express框架）、SQLite数据库、Docker容器化部署及静态前端界面托管于Vercel。适合对预测市场感兴趣的用户进行研究性学习和实验，特别是那些熟悉Node.js与Docker环境配置的技术爱好者。注意，该系统默认仅支持模拟交易，不涉及真实资金操作。","2026-06-01 03:44:47","CREATED_QUERY"]