/livetennisapi:polymarket-tennisfrom livetennisapi
Builds observe-only Polymarket and Kalshi tennis market tooling using the polymarket-tennis Python package and Live Tennis API free tier. Covers GammaClient, LiveTennisClient, market discovery, match-market matching, and settlement rules.
Ships in livetennisapi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Vendor-authored, observe-only. This skill is maintained by the team behind the Live Tennis API. It teaches the
polymarket-tennispackage, which reads public market data and live scores. It contains no order execution, no wallet or private-key handling, no CLOB client, and no strategy advice. Execution is permanently out of scope. Nothing here is financial advice.
description (market.raw["description"]),
Kalshi rules_secondary — and print it. The reference matrix in
references/settlement-rules.md is for the
human, not for code branches.LiveTennisClient call costs one request; Gamma and Kalshi reads cost nothing.
pmtennis watch is 1 request per poll at a 60 s default (minimum 30 s). A
watcher that calls live_matches() + fixtures() per poll costs 2 per poll
and must self-cap (the reference build caps at 96/day, --interval 300).outcome and event_status, not status.
status is only the lifecycle (upcoming|live|completed|cancelled).
outcome is completed|retired|walkover|default|abandoned and null until
settled; event_status is the detailed match-state label (Retired, Walk Over,
Cancelled, Postponed, Interrupted); withdrew names who stopped.match_market returns None on
ambiguity; skip it. Use override_match_id / --match-id only when the user
supplies the id explicitly.httpx.MockTransport; never
put live calls in tests.pip install polymarket-tennis # Python 3.10+, depends only on httpx
pmtennis discover --matches-only --moneyline-only # keyless, Gamma only
export LIVETENNIS_API_KEY=ltapi_... # free, no card: https://livetennisapi.com/subscribe/free
pmtennis match atp-lehecka-fils-2026-08-17 # show the pairing decision + confidence
pmtennis watch atp-lehecka-fils-2026-08-17 # 1 request per poll, 60 s default
Env-var names differ between the two Live Tennis API tools: the Python package reads
LIVETENNIS_API_KEY; the livetennisapi-mcp server/plugin reads LIVETENNISAPI_KEY.
Same key value works in both.
Library form — every symbol below is exported from polymarket_tennis.__init__:
from polymarket_tennis import (
GammaClient, LiveTennisClient,
discover_tennis_markets, match_market, build_view,
)
with GammaClient() as gamma, LiveTennisClient() as lta:
markets = discover_tennis_markets(gamma, market_types={"moneyline"},
matches_only=True)
candidates = lta.live_matches() + lta.fixtures() # 2 free-tier requests
for market in markets:
decision = match_market(market, candidates)
if decision is None:
continue # ambiguous or no live counterpart — never guessed
view = build_view(market, decision.match)
print(view.render())
Sample view.render() output:
Cincinnati Open: Jiri Lehecka vs Arthur Fils [atp-lehecka-fils-2026-08-17]
market: Jiri Lehecka 0.095 | Arthur Fils 0.905 (as of 12s ago)
live: Jiri Lehecka vs Arthur Fils 4-6 3-4 (15-40) serving: Jiri Lehecka [BREAK POINT] (as of 8s ago)
| Symbol | What it does | Network cost |
|---|---|---|
GammaClient() | Polymarket Gamma API (keyless): events(), event_by_slug(), market_by_id(), market_by_slug(), market() | none against your key |
LiveTennisClient(api_key=None) | Live Tennis API; key from LIVETENNIS_API_KEY: matches(), live_matches(), match(id), fixtures(), players(search) | 1 request per call |
discover_tennis_markets(client, market_types=None, include_closed=False, matches_only=False, limit=100) | normalized TennisMarket list from the tennis tag | Gamma only |
find_market(client, id_or_slug) | one TennisMarket by Gamma id, market slug, or event slug | Gamma only |
match_market(market, candidates, override_match_id=None, threshold=0.70, ambiguity_margin=0.10) | MatchDecision or None | pure |
build_view(market, match) | LiveMarketView with both feeds' staleness | pure |
derive_break_point(score), score_line(score) | helpers used by the view | pure |
TennisMarket.price_by_outcome, .slug_date, .raw | prices dict, slug date, the raw Gamma object (settlement text lives in raw["description"]) | — |
Full signatures, dataclass fields, and the live-match JSON shape are in
references/api.md. Read it before writing code that touches
fields not shown above — in particular, TennisMarket has no description
attribute and LiveMarketView does not expose outcome; go through .raw
and .match.
discover_tennis_markets(gamma, market_types={"moneyline"}, matches_only=True).
Futures/outrights are dropped by matches_only; doubles markets are rejected by
the matcher in v0.1.lta.live_matches() (+ lta.fixtures() if
you need pre-start matches). Count the requests; budget them against 100/day.match_market(market, candidates); skip None.
Log decision.confidence and decision.method ("explicit" | "names+date" | "names").build_view(market, decision.match); read view.prices,
view.score_line, view.server (1/2), view.break_point, view.is_tiebreak,
view.event_status, and both view.market_staleness() / view.live_staleness().view.match.get("outcome") and
view.match.get("event_status"); when outcome in ("retired", "walkover", "default", "abandoned") or event_status == "Cancelled", print
view.market.raw.get("description") verbatim (fall back to rules_secondary,
then say the payload carries no rule text). Do not compute a payout.def settlement_text(view) -> str:
raw = view.market.raw
text = raw.get("description") or raw.get("rules_secondary")
return text or "(market payload carries no settlement text; read it on the venue)"
The package discovers Polymarket markets (Gamma). Kalshi publishes each market's
rule text in its public read endpoint, keyless; the same outcome/event_status
detection applies. Use the package's LiveTennisClient for the live side and read
Kalshi directly for the market side (see
references/settlement-rules.md for the Kalshi
snippet and the ATP/WTA vs ITF series difference). Do not hard-code the ITF $0.50
rule; print rules_secondary.
When the user wants a watcher "vibe-coded" end to end, use the prompt in
references/one-prompt-build.md. It is the exact
prompt from the package README; what it produced, unedited except for lint, is in
examples/claude-code-watcher/ of the repository (7 offline tests, ruff clean,
--once --fixtures dry run without a key). That README also lists the honest
deviations — read them before re-running the prompt, because two of them are
traps: the prompt's "once a minute" costs 2 requests per poll (so the watcher must
self-cap), and the offline fixtures carry event_status but no outcome key.
The short version, for the human reading this — the code must still print the market's own text:
| Scenario | Polymarket (polymarket.com) | Polymarket US | Kalshi (ATP/WTA) | Kalshi (ITF) |
|---|---|---|---|---|
| Walkover / withdrawal before the match starts | 50-50 | Last fair market price at announcement | Fair price per rules | $0.50 per contract |
| Match cancelled, not played | 50-50 | Last fair market price | Fair price per rules | $0.50 |
| Retirement after play starts (injury, default, DQ) | Advancing player wins | Awarded winner settles $1.00 | Winner resolves Yes ("after a ball has been played") | Winner Yes; withdrawing/forfeiting player No |
| Delayed / postponed | 50-50 if beyond 7 days with no winner | — (see venue FAQ) | Stays open, closes after rescheduled match (within two weeks) | Same as ATP/WTA |
| What counts as "started" | "the match begins" | First serve is struck | A ball has been played | A ball has been played |
Verbatim venue quotes, source URLs, retrieval dates, and the live-data mapping
(outcome/event_status/withdrew to each venue column) are in
references/settlement-rules.md. Rules are per
market and can change; the market's own text always wins over that file.
ruff check clean; tests run with no network (httpx.MockTransport or fixture files).references/api.md.outcome / event_status, never status == "completed" alone.polymarket-tennis)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (livetennisapi/livetennisapi-mcp) — no native marketplace selected
npx claudepluginhub p/livetennisapi-livetennisapiOther plugins' skills for the same job