[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80869":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":5,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":25,"discoverSource":26},80869,"poly-trading-bot","zostaff\u002Fpoly-trading-bot","zostaff",null,"Python",37,11,35,1,0,2,44.44,"MIT License",false,"main",true,[],"2026-06-12 04:01:30","# Polymarket AI Trading Bot\n\n\u003Cdiv align=\"center\">\n\n[![Python 3.12+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.12%2B-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](LICENSE)\n\n**A toolkit for building automated trading strategies on [Polymarket](https:\u002F\u002Fpolymarket.com) prediction markets.**\n\nPolymarket CLOB client (EIP-712 signed orders via [`py-clob-client`](https:\u002F\u002Fgithub.com\u002FPolymarket\u002Fpy-clob-client)), Gamma API ingestion for market discovery, USDC.e balance reads on Polygon, position tracking, SQLite telemetry, a Streamlit dashboard, and a pluggable LLM client (any model on OpenRouter). Three example strategies ship with the repo as starting points — fork them, replace them, or write your own from scratch.\n\n> **Heritage note.** The trading-strategy logic, risk management, dashboard, telemetry, and LLM stack are exchange-agnostic. The exchange layer (CLOB client, market discovery, USDC.e balance reads on Polygon) is purpose-built for Polymarket. Any `*.legacy.bak` files in `src\u002Fclients\u002F` are archived sources from a previous exchange port and will be removed once a live trading session has been verified end-to-end.\n\n\u003C\u002Fdiv>\n\n---\n\n> **Read this before running with real money.** No strategy in this repo is guaranteed to make money. The examples lose money on certain markets. Trading prediction markets is hard, the edges are small, and what worked last quarter may not work this quarter. This is a toolkit, not a turnkey bot. Read the code, understand what it does, and tune it for the markets you care about. The authors are not responsible for losses you incur using this software.\n\n---\n\n## Quick Start\n\n```bash\n# 1. Clone and set up\ngit clone \u003Cyour fork URL>\ncd polymarket-trading-bot\npython setup.py        # creates .venv, installs deps (incl. py-clob-client + web3)\n\n# 2. Add your keys & wallet\ncp env.template .env\n# then open .env and fill in:\n#   POLYMARKET_PRIVATE_KEY   — Polygon wallet that will sign orders\n#   POLYMARKET_FUNDER        — proxy address (only if SIGNATURE_TYPE != 0)\n#   POLYMARKET_SIGNATURE_TYPE — 0=EOA\u002FMetaMask, 1=Magic Link, 2=Gnosis Safe\n#   OPENROUTER_API_KEY       — for LLM-driven strategies\n\n# 3. (One-time) approve USDC allowances for the Polymarket contracts\npython scripts\u002Fset_allowances.py\n\n# 4. Verify connectivity\npython cli.py health\n\n# 5. Run an example strategy in DRY-RUN mode (default)\npython cli.py run --paper                  # AI directional (LLM-driven)\npython cli.py run --safe-compounder        # Edge-based NO-side, no LLM\n```\n\nOpen the dashboard in another terminal:\n\n```bash\npython cli.py dashboard\n```\n\n> **Need keys?**\n> - Polygon wallet → export the private key from MetaMask (or use a Magic Link wallet from [polymarket.com](https:\u002F\u002Fpolymarket.com))\n> - You'll also need USDC.e on Polygon to actually trade — `python cli.py status` will print your balance\n> - OpenRouter key → [openrouter.ai](https:\u002F\u002Fopenrouter.ai\u002F)\n\n---\n\n## What's Included\n\nThis repo gives you the building blocks. The example strategies use them — your own strategies can too.\n\n| Component | What it does | Where it lives |\n|---|---|---|\n| **Polymarket client** | Authenticated REST + WebSocket client (RSA signing, retries, rate-limit handling) | `src\u002Fclients\u002Fpolymarket_client.py` |\n| **Market ingestion** | Pulls the full tradeable universe via the Events API, persists to SQLite | `src\u002Fjobs\u002Fingest.py` |\n| **Position tracking** | Stop-loss, take-profit, time-based, and resolution-based exits with real Polymarket sell orders | `src\u002Fjobs\u002Ftrack.py` |\n| **LLM client** | Single OpenRouter API key, swap models with one config line, fallback chain on errors, persistent daily-cost tracker | `src\u002Fclients\u002Fopenrouter_client.py`, `src\u002Fclients\u002Fxai_client.py` |\n| **SQLite telemetry** | Every trade, AI decision, and cost metric logged locally | `src\u002Futils\u002Fdatabase.py` |\n| **Streamlit dashboard** | Real-time portfolio, positions, P&L, decision logs | `beast_mode_dashboard.py` |\n| **Paper trading** | Log signals against settled markets without sending orders | `paper_trader.py` |\n| **CLI** | `run`, `dashboard`, `status`, `health`, `scores`, `history`, `close-all` | `cli.py` |\n| **Risk helpers** | Kelly sizing, stop-loss math, drawdown circuit breaker | `src\u002Futils\u002F`, `src\u002Fstrategies\u002F` |\n\nThe repo also ships scaffolding for things that aren't fully wired — multi-agent debate runners in `src\u002Fagents\u002F`, sentiment analyzer in `src\u002Fdata\u002F`, etc. Treat them as starting points if you want to extend them.\n\n---\n\n## Example Strategies\n\nThree strategies ship with the repo. **None of them is \"the right answer.\"** They exist so you can run something end-to-end and see how the pieces connect, then fork the one closest to what you want to build.\n\n### 1. AI Directional — `python cli.py run`\n\nThe default. For each candidate market, it calls a single LLM via OpenRouter (with a fallback chain on errors) to score directional confidence, then sizes positions with fractional Kelly and applies category\u002Fsector guardrails.\n\n> **It is not a \"5-model ensemble\"** despite earlier README claims. One model is called per decision. The fallback chain only triggers on errors. The agents\u002F directory contains scaffolding for real parallel multi-model voting, but it's not wired into the live trading path. If you want a real ensemble, fork `src\u002Fjobs\u002Fdecide.py` and build it.\n\n```bash\npython cli.py run --paper          # paper trading\npython cli.py run --live           # live trading (real money)\n```\n\nDefaults: 15% max drawdown, 45% min confidence, 3% max position size, 30% max sector concentration, quarter-Kelly. All configurable in `src\u002Fconfig\u002Fsettings.py`.\n\n### 2. Safe Compounder — `python cli.py run --safe-compounder`\n\nPure edge-based math, no LLM required. Scans every active Polymarket market for NO-side asks above a price threshold with a positive expected-value edge, then places resting maker orders one cent below the ask.\n\n```bash\npython cli.py run --safe-compounder              # dry-run preview\npython cli.py run --safe-compounder --live       # live execution\n\n# Run continuously instead of one cycle and exit:\npython cli.py run --safe-compounder --live --loop --interval 300\n```\n\nRules: NO side only, YES last ≤ 20¢, NO ask > 80¢, edge > 5¢, max 10%\u002Fposition, skips sports\u002Fentertainment\u002F\"mention\" markets.\n\n### 3. Beast Mode — `python cli.py run --beast`\n\nAggressive settings with no category guardrails. Available for comparison and experimentation — **not recommended for live trading**. Running this with real money historically led to significant losses on this repo.\n\n---\n\n## Stopping Cleanly\n\nCtrl-C sends SIGINT and triggers graceful shutdown — the bot finishes the in-flight cycle, logs, and exits. Open positions remain on Polymarket until they resolve.\n\nIf you want to **liquidate everything** before stepping away:\n\n```bash\n# 1. Stop the bot\nCtrl-C\n\n# 2. Place limit sells at the current best bid for every open position\npython cli.py close-all              # dry-run preview\npython cli.py close-all --live       # actually send orders\n\n# 3. Verify\npython cli.py status\n```\n\n`close-all` queries Polymarket directly (not the local DB), so it works even when local state is stale. Sells are limit-priced, so they may rest unfilled on thin books — check Polymarket or `cli.py status` after a minute.\n\n---\n\n## Installation\n\n### Prerequisites\n\n- Python 3.12 or later\n- A [Polymarket](https:\u002F\u002Fpolymarket.com) account with API access ([API docs](https:\u002F\u002Fdocs.polymarket.com))\n- An [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002F) API key (only needed for the AI directional strategy)\n\n### Automated Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzostaff\u002Fpolymarket-ai-trading-bot.git\ncd polymarket-ai-trading-bot\npython setup.py\n```\n\nCreates a virtual env, installs dependencies, and prints next steps.\n\n### Manual Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzostaff\u002Fpolymarket-ai-trading-bot.git\ncd polymarket-ai-trading-bot\n\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate        # macOS \u002F Linux\n# .venv\\Scripts\\activate          # Windows\n\npip install -r requirements.txt\n```\n\n### Configuration\n\n```bash\ncp env.template .env\n# then edit .env with your keys\n```\n\n| Variable | Description |\n|---|---|\n| `POLYMARKET_PRIVATE_KEY` | Polygon wallet private key that signs orders (0x-prefixed 64-hex) |\n| `POLYMARKET_FUNDER` | Optional. Proxy address that holds USDC (only set when `SIGNATURE_TYPE != 0`) |\n| `POLYMARKET_SIGNATURE_TYPE` | `0` = EOA \u002F MetaMask (default), `1` = Magic Link, `2` = Gnosis Safe |\n| `POLYMARKET_HOST` | Defaults to `https:\u002F\u002Fclob.polymarket.com` |\n| `POLYMARKET_CHAIN_ID` | Defaults to `137` (Polygon mainnet) |\n| `POLYGON_RPC_URL` | Optional custom Polygon RPC; defaults to the public endpoint |\n| `OPENROUTER_API_KEY` | OpenRouter key (only for the AI directional strategy) |\n| `DRY_RUN` \u002F `LIVE_TRADING_ENABLED` | `DRY_RUN=true` (default) keeps the bot in paper mode. `LIVE_TRADING_ENABLED=true` is the legacy flag, equivalent to `DRY_RUN=false`. |\n\nThe wallet's private key lives in `.env` only — never on disk. `.env` is git-ignored.\n\nVerify everything is wired:\n\n```bash\npython cli.py health\n```\n\n---\n\n## Configuration\n\nAll trading parameters live in `src\u002Fconfig\u002Fsettings.py`. The most useful knobs:\n\n```python\n# Position sizing\nmax_position_size_pct  = 3.0     # Max 3% of balance per position\nmax_positions          = 10      # Max concurrent positions\nkelly_fraction         = 0.25    # Quarter-Kelly (conservative)\n\n# Market filtering\nmin_volume             = 500     # Minimum contract volume\nmax_time_to_expiry_days = 14     # How far out to trade\nmin_confidence_to_trade = 0.45   # Minimum AI confidence to enter\n\n# LLM (OpenRouter)\nprimary_model          = \"anthropic\u002Fclaude-sonnet-4.5\"\nai_temperature         = 0       # Deterministic\nai_max_tokens          = 8000\n\n# Risk management\nmax_daily_loss_pct     = 10.0    # Daily loss circuit breaker\nmax_drawdown           = 0.15    # Portfolio drawdown halt\ndaily_ai_cost_limit    = 10.0    # Max daily LLM spend in USD\n```\n\n**Swapping models:** change `primary_model` to any slug from [openrouter.ai\u002Fmodels](https:\u002F\u002Fopenrouter.ai\u002Fmodels). The fallback chain in `src\u002Fclients\u002Fopenrouter_client.py` controls what happens when the primary errors.\n\n**Controlling LLM spend:** the bot checks the daily limit before every API call and skips trading until the next calendar day once exhausted. Set `DAILY_AI_COST_LIMIT` in `.env` to override.\n\n---\n\n## Project Structure\n\n```\npolymarket-ai-trading-bot\u002F\n├── beast_mode_bot.py          # Example AI directional bot — main loop orchestration\n├── cli.py                     # Unified CLI: run, dashboard, status, health, close-all, scores, history\n├── paper_trader.py            # Paper-trading signal logger + static dashboard\n├── setup.py                   # Bootstrap script\n├── env.template               # Environment variable template\n│\n├── src\u002F\n│   ├── agents\u002F                # UNWIRED scaffolding for multi-agent debate (fork to use)\n│   ├── clients\u002F               # Polymarket, OpenRouter, WebSocket clients\n│   ├── config\u002F                # Settings and trading parameters\n│   ├── data\u002F                  # News + sentiment helpers (optional)\n│   ├── events\u002F                # Async event bus\n│   ├── jobs\u002F                  # ingest, decide, execute, track, evaluate\n│   ├── strategies\u002F            # Safe compounder, category scorer, portfolio enforcer\n│   └── utils\u002F                 # Database, logging, prompts, risk helpers\n│\n├── scripts\u002F                   # Diagnostic and utility scripts\n├── docs\u002F                      # Additional docs + paper-trading dashboard HTML\n└── tests\u002F                     # Pytest suite\n```\n\n---\n\n## Paper Trading\n\nSimulate trades without sending real orders. Every signal is logged to SQLite and a static HTML dashboard renders cumulative P&L after markets settle.\n\n```bash\npython paper_trader.py                            # one scan\npython paper_trader.py --loop --interval 900      # continuous, every 15m\npython paper_trader.py --settle                   # update outcomes for resolved markets\npython paper_trader.py --dashboard                # regenerate HTML\npython paper_trader.py --stats                    # print stats\n```\n\nOutput goes to `docs\u002Fpaper_dashboard.html`.\n\n---\n\n## Category Scoring (used by AI Directional)\n\nThe category scorer evaluates each Polymarket market category on a 0-100 scale based on historical ROI, win rate, recent trend, and sample size. Allocation per category is gated by score.\n\n| Score | Max Position | Status |\n|---|---|---|\n| 80–100 | 20% | STRONG |\n| 60–79 | 10% | GOOD |\n| 40–59 | 5% | WEAK |\n| 20–39 | 2% | POOR |\n| 0–19 | 0 | BLOCKED |\n\n```bash\npython cli.py scores\n```\n\nThis is one heuristic for category-level risk control. If it doesn't fit your strategy, ignore it — it's only used by the AI directional path.\n\n---\n\n## Performance Tracking\n\nEvery trade, AI decision, and cost metric is recorded to `trading_system.db` (local SQLite). Inspect via the dashboard or:\n\n```bash\npython cli.py history                # Last 50 trades\npython cli.py history --limit 100    # Last 100\npython cli.py status                 # Live balance + open positions from Polymarket\n```\n\n---\n\n## Development\n\n### Running Tests\n\n```bash\npytest tests\u002F          # full suite\npytest tests\u002F -v       # verbose\npytest --cov=src       # with coverage\n```\n\n### Code Quality\n\n```bash\nblack src\u002F tests\u002F cli.py beast_mode_bot.py\nisort src\u002F tests\u002F cli.py beast_mode_bot.py\nmypy src\u002F\n```\n\n### Adding a New Strategy\n\n1. Create a module under `src\u002Fstrategies\u002F`\n2. Wire it into a CLI flag in `cli.py` (or invoke it directly)\n3. Use the `PolymarketClient` for orders\u002Fpositions and `DatabaseManager` for state\n4. Add tests under `tests\u002F`\n\n---\n\n## Troubleshooting\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Health check fails with auth \u002F signing error\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nPolymarket auth = an EIP-712 signature derived from your wallet's private key. Auth failures usually mean one of:\n\n1. `POLYMARKET_PRIVATE_KEY` in `.env` is malformed (must be `0x` + 64 hex chars).\n2. `POLYMARKET_SIGNATURE_TYPE` doesn't match the wallet kind: `0` for an EOA you exported from MetaMask, `1` for a Magic-Link \u002F email-login wallet, `2` for Gnosis Safe \u002F browser proxy. With `1` or `2`, you also need to set `POLYMARKET_FUNDER` to the proxy address that holds USDC.\n3. `python cli.py health --full` is the path that actually signs — the default health command skips it to save Polymarket rate-limit slots.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Order placement fails with `not allowed for this market`\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nPolymarket has two exchange contracts: the standard CTF Exchange and the newer `neg_risk_exchange` for negative-risk markets (most multi-outcome event markets). The bot reads each market's `negRisk` flag from Gamma at ingestion time and routes orders accordingly. If you see this error, verify the market was registered through the ingestion job (not constructed by hand) — `polymarket_client.register_market(condition_id, yes, no, neg_risk=...)` must be called with the right flag.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>\"Shutdown signal received\" without pressing Ctrl-C\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe bot now logs which signal arrived (SIGINT, SIGTERM, or SIGHUP). If you see SIGTERM or SIGHUP without sending it yourself, common causes:\n\n- Parent shell closed (run inside `tmux`, `screen`, or with `nohup`)\n- A cloud platform \u002F systemd \u002F launchd timeout\n- Another shell sent `kill \u003Cpid>`\n- An OOM killer warning before SIGKILL\n\nThe bot did not kill itself — something external ended the process.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Bot ran for weeks but placed no positions\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThis is expected behavior, not a bug. The example strategies are conservative by design:\n\n- **AI Directional** requires confidence ≥ 45%, category score ≥ 30, and is gated by drawdown \u002F sector caps. On many days, no markets clear all four filters.\n- **Safe Compounder** requires NO ask > 80¢ AND edge > 5¢. Most NO-side markets don't meet both.\n\nIf you want more activity, lower the thresholds in `src\u002Fconfig\u002Fsettings.py` (or the relevant strategy file) — but that means taking lower-edge bets. Or write your own strategy that targets the markets you actually have an edge on. This repo is a toolkit; the example thresholds are starting points.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>\"no such table: positions\" error on fresh install\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe DB file isn't committed; it's created at runtime. The bot auto-initializes on startup, but you can do it manually:\n\n```bash\npython -m src.utils.database\n```\n\nUse `-m` — running `python src\u002Futils\u002Fdatabase.py` directly fails with an import error.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>AdGuard (macOS) blocks dependency downloads\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nIf AdGuard is running as a system-level proxy, `pip install` may time out during setup. Disable AdGuard at the system level for the install, then re-enable it. AdGuard as a browser extension is fine.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Bot not placing live trades despite --live\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n```bash\ngrep -i \"live trading\\|paper trading\\|LIVE ORDER\" logs\u002Ftrading_system.log | tail -20\n```\n\nIf you see \"Paper trading mode\" the flag isn't taking effect. Verify the API key has trading permissions in [Polymarket Settings](https:\u002F\u002Fpolymarket.com).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Model not found \u002F OpenRouter API errors\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nModel names on OpenRouter change. Update `primary_model` in `src\u002Fconfig\u002Fsettings.py` with a current slug from [openrouter.ai\u002Fmodels](https:\u002F\u002Fopenrouter.ai\u002Fmodels), or set `PRIMARY_MODEL` in `.env`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Bot only seeing \"KXMVE\" tickers\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe Polymarket `\u002Fmarkets` endpoint returns parlay tickers; real markets live under the Events API. The ingestion pipeline already uses Events with nested markets. If you see only `KXMVE*`, check API permissions and run `python cli.py health`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Python 3.14 PyO3 compatibility error\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n```bash\nexport PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1\npip install -r requirements.txt\n```\n\nOr use Python 3.13:\n\n```bash\npyenv install 3.13.1 && pyenv local 3.13.1\npython -m venv .venv && source .venv\u002Fbin\u002Factivate\npip install -r requirements.txt\n```\n\n\u003C\u002Fdetails>\n\n---\n\n## Lessons From Live Trading\n\nThese are observations from running the example strategies with real money on Polymarket. They informed the defaults shipped here. They are **not** universal trading wisdom — they're notes from one set of experiments.\n\n**1. Category discipline mattered more than AI confidence.** The LLM could be 80% confident on a CPI trade and still be wrong. Market-implied probabilities on highly-watched economic releases are already efficient.\n\n**2. Kelly fraction matters enormously.** Three-quarter Kelly compounds losses catastrophically on a 45% win-rate strategy. Quarter-Kelly is what the example strategies use.\n\n**3. A 50% drawdown limit isn't a limit.** The default is 15% with the circuit breaker actually halting trades, not just logging.\n\n**4. Sector concentration creates correlated losses.** When 90% of capital is in economic categories on a Fed day, everything moves together. The default cap is 30% per category.\n\n**5. More trades without edge is faster path to zero.** The default scan interval is 60 seconds, not 30, and trades are gated by both confidence and category score.\n\nYour edge is probably somewhere else. Use the toolkit to find it.\n\n---\n\n## Contributing\n\nContributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.\n\n```bash\n# 1. Fork\n# 2. Create a feature branch\ngit checkout -b feature\u002Fyour-feature\n# 3. Make changes, add tests, run pytest and black\n# 4. Commit using conventional commits (feat:, fix:, refactor:)\n# 5. Open a PR\n```\n\n---\n\n## Resources\n\n- [Polymarket Trading API](https:\u002F\u002Fdocs.polymarket.com)\n- [Polymarket CLOB Authentication](https:\u002F\u002Fdocs.polymarket.com)\n- [Polymarket Markets](https:\u002F\u002Fpolymarket.com\u002Fmarkets)\n- [OpenRouter Model Catalog](https:\u002F\u002Fopenrouter.ai\u002Fmodels)\n\n---\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\n---\n\n\u003Cdiv align=\"center\">\n\nIf this is useful to you, a star helps others find it.\n\n\u003C\u002Fdiv>\n","Poly-trading-bot 是一个用于在 Polymarket 预测市场上构建自动化交易策略的工具包。其核心功能包括通过 EIP-712 签名订单实现的 CLOB 客户端、Gamma API 市场发现、Polygon 上 USDC.e 余额读取、仓位跟踪、SQLite 数据收集以及 Streamlit 仪表板，还支持可插拔的大语言模型客户端。该项目特别适用于希望在 Polymarket 平台上测试和运行自定义或预设交易策略的开发者与量化交易者。需要注意的是，虽然提供了几种示例策略作为起点，但用户应充分理解代码并根据目标市场调整策略以避免潜在损失。","2026-06-11 04:02:37","CREATED_QUERY"]