I Vibe-Coded a Polymarket Tennis Market Watcher With One Prompt in Claude Code
说明与用途
使用 Claude Code 一键生成的 Python 观察脚本,实时收集 Polymarket 及 Live Tennis API 的比赛与价格数据,记录关键事件,且不下单。
问题
Build a real‑time tennis market watcher that logs price movements and key match events without placing real orders.
结果
The generated script successfully logged market data and key match events during the US Open, demonstrating that Claude Code can produce a functional observe‑only watcher from a single prompt.
工作流
- 1. Install polymarket‑tennis via pip.
- 2. Use GammaClient.discover_tennis_markets() to list open moneyline markets.
- 3. Instantiate LiveTennisClient with LIVETENNIS_API_KEY to fetch live matches and fixtures.
- 4. For each market, call match_market() to get candidates and skip None results.
- 5. Build a view with build_view() and log market question, outcome prices, live score line, server, break‑point flag, and staleness ages every minute (respecting free tier limits).
- 6. Maintain a local JSON “paper book” recording entries when the favourite faces a break point and price moves when the match resolves.
- 7. Handle retired or walkover outcomes by printing the market description’s settlement text.
- 8. Add README, requirements.txt, and offline tests with fixtures.
- 9. Run the script in observe‑only mode (no wallets, no keys beyond the tennis API key).
证据
Claude Code fetched the GitHub repo and read the installed package's source instead of relying on the README alone.
The script logs market question, both outcome prices, the live score line, who is serving, the break‑point flag, and both staleness ages.
- 记录日期: 2026-09-07T16:59:44.486Z