examples: tennis market monitor with live match-state overlay - #26
Open
bensynapse wants to merge 1 commit into
Open
examples: tennis market monitor with live match-state overlay#26bensynapse wants to merge 1 commit into
bensynapse wants to merge 1 commit into
Conversation
Adds examples/tennis_market_monitor.py, mirroring examples/simple_monitor.py: PolyTerm's GammaClient remains the sole Polymarket data source, and the script overlays an independent, read-only live-score/server/break-point annotation on a tennis event. Read-only — no order or execution code is touched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
examples/tennis_market_monitor.py— a new runnable example that mirrorsexamples/simple_monitor.py. It watches Polymarket tennis events through PolyTerm's ownGammaClientand overlays an independent, read-only live match-state annotation (score, who's serving, break point) next to each market.It follows the existing example pattern exactly:
examples/,Config()+GammaClient(...)construction likesimple_monitor.py;polyterm.api.market_utils.market_probability_price/parse_list_fieldfor the Polymarket side (no new market-data path);Data sources
GammaClient(unchanged; the sole market-data source here).GET /matches?status=live), used purely as an external score/status annotation.Vendor disclosure
I run the Live Tennis API (https://livetennisapi.com), so this example is vendor-authored — please judge accordingly. It positions the feed as an independent live-score/status source for debugging/annotating a market's inputs, never as an oracle, venue, or resolution source; the module docstring tells readers to confirm official resolution criteria on the Polymarket page. The free keyed tier (https://livetennisapi.com/subscribe/free) covers live matches + scores at 30 req/min, 100 req/day — enough for a develop-and-test or ~15-minute-cadence check, not continuous fast polling. The overlay is opt-in via
LIVETENNIS_API_KEY; with no key set, the script prints the Polymarket side only. Happy to hand a maintainer a free key to try it.Checks run locally
polyterm/— passes.venv(pip install -e .).derive_break_pointhelper is verified offline against the documented convention (receiver at AD, or receiver at 40 vs server 0/15/30; never in a tiebreak; null-safe on null server/points).pytest tests/ --ignore=tests/test_live_data --ignore=tests/test_tui/test_integration.py→ 1116 passed, 1 skipped. (The 11test_agent_mcp.pyfailures are a pre-existingmcp-package version guard inpolyterm/agent/mcp/fastmcp_server.py, unrelated to this change — the new file is only added underexamples/and is imported by no test.)grep -riE "casino|gambling"over the diff is empty.