Tennis WebSocket API: real-time points and live odds.
Connect once to `wss://api.citoapi.com/api/v1/tennis/live/ws` and subscribe to `all`, `match:{matchId}`, or `odds:{matchId}`. Receive `POINT_UPDATE`, `MATCH_FINISHED`, `tennis.odds.snapshot`, and `tennis.odds.updated` frames with zero per-frame quota fees.
- Rooms: all, match:{id}, odds:{id}
- 0 per-frame charges (1 req / 15s open)
- Server headers + browser subprotocol auth
{ "type": "POINT_UPDATE", "room": "match:m_2026_4893994", "match_id": "m_2026_4893994", "data": { "current_set": 2, "game_score": "30:15", "server": 1, "sets": [ { "set_number": 1, "player1_games": 6, "player2_games": 4, "is_completed": true }, { "set_number": 2, "player1_games": 3, "player2_games": 2, "is_completed": false } ] }}Seamless Integration with our MCP Server
Connect Claude, Cursor, or ChatGPT with the Cito MCP server so agents call real match IDs, point timelines, rankings, and Challenger/ITF results instead of guessing them.
MCPInstall the Cito MCP serverOne socket for points and market ticks
Replace high-frequency REST polling loops with multiplexed room subscriptions and automatic 15-second heartbeats. WebSockets push the live board from the same tennis API that powers REST results, Elo, and historical match logs.
Three room patterns
Subscribe to all live matches, target match:{matchId} for score/point diffs, or odds:{matchId} for live market prices.
Snapshot on subscribe
Include "snapshot": true in your subscribe command to hydrate current state immediately alongside live updates.
Browser-safe subprotocol
Send x-api-key / Authorization: Bearer from servers, or ["cito.v1", "cito.key.<KEY>"] from browsers.
Zero per-frame billing
Meters 1 request on connect plus 1 request per 15s open — identical to SSE, no matter how many points or odds ticks fire.
15s heartbeat, no idle close
Receives a ping frame every 15 seconds with no idle timeout while matches are open.
Unified match IDs
Every frame carries canonical match_id values ready to join with /tennis/matches/{id}, Elo, and H2H.
What rooms, actions, and events does the Tennis WebSocket use?
After connecting to wss://api.citoapi.com/api/v1/tennis/live/ws, the server sends a ready frame. Send a JSON subscribe payload naming any mix of all, match:{matchId}, or odds:{matchId} rooms, then handle point, match-finish, odds, ping, and error frames.
| Frame / Room | Direction | Meaning |
|---|---|---|
| `{"action":"subscribe","rooms":["all"],"snapshot":true}` | Client -> Server | Subscribe to `all`, `match:{matchId}`, and/or `odds:{matchId}` rooms |
| `ready` / `subscribed` | Server -> Client | Handshake acknowledgement and confirmed room list |
| `POINT_UPDATE` | Server -> Client | Live set, game, server, and point-score update for subscribed match rooms |
| `MATCH_FINISHED` | Server -> Client | Match left the live board; fetch `/tennis/matches/{matchId}` for finalised box score |
| `tennis.odds.snapshot` / `tennis.odds.updated` | Server -> Client | Initial odds state and real-time market tick updates on `odds:{matchId}` |
| `ping` (every 15s) | Server -> Client | Keep-alive heartbeat; there is no idle close |
| `error` | Server -> Client | Structured error frame (ignore unknown frame types and fields for forward compatibility) |
How do I connect from Python, Node.js/TypeScript, and the browser?
Server clients should send the x-api-key or Authorization: Bearer header during the upgrade handshake. Browser clients cannot set custom WebSocket headers, so pass ["cito.v1", "cito.key." + key] as the subprotocol array.
import asyncio, json, os, websockets
URL = "wss://api.citoapi.com/api/v1/tennis/live/ws"
HEADERS = {"x-api-key": os.environ["CITO_API_KEY"]}
async def main():
async with websockets.connect(URL, additional_headers=HEADERS) as ws:
await ws.send(json.dumps({
"action": "subscribe",
"rooms": ["all", "odds:m_2026_4893994"],
"snapshot": True,
}))
async for raw in ws:
frame = json.loads(raw)
ftype = frame.get("type")
if ftype in ("POINT_UPDATE", "MATCH_FINISHED", "tennis.odds.snapshot", "tennis.odds.updated"):
print(ftype, frame.get("match_id"), frame.get("data"))
asyncio.run(main())import WebSocket from "ws";
// Node.js / server-side: authenticate via x-api-key or Authorization: Bearer
const ws = new WebSocket("wss://api.citoapi.com/api/v1/tennis/live/ws", {
headers: { "x-api-key": process.env.CITO_API_KEY! },
});
ws.on("open", () => {
ws.send(JSON.stringify({ action: "subscribe", rooms: ["all"], snapshot: true }));
});
ws.on("message", (raw) => {
const frame = JSON.parse(raw.toString());
if (frame.type === "POINT_UPDATE") console.log("Point:", frame);
if (frame.type === "MATCH_FINISHED") console.log("Finished:", frame.match_id);
});
// Browser WebSocket (subprotocol auth — never hardcode a production key in public client bundles):
// const browserWs = new WebSocket("wss://api.citoapi.com/api/v1/tennis/live/ws", ["cito.v1", "cito.key." + token]);npx wscat -c "wss://api.citoapi.com/api/v1/tennis/live/ws" -H "x-api-key: YOUR_API_KEY"
# After "ready", send:
# {"action":"subscribe","rooms":["all"],"snapshot":true}Which plans unlock WebSockets, and how does quota metering work?
WebSockets are a live-push tier feature with real-time delivery (0s artificial delay) and flat time-based metering. Free and Starter users can use the SSE stream (/tennis/live/stream) with a 60-second delay before upgrading.
| Question | Verified behavior |
|---|---|
| Which tiers get WSS access? | Included on Scale ($100/mo) and Business CSV ($299/mo), or available as a +$15/mo add-on on Pro ($59/mo). Free and Starter receive HTTP `403 WEBSOCKETS_REQUIRED` on upgrade. |
| Alternative for Free / Starter | Use `GET /api/v1/tennis/live/stream` (SSE) or `GET /api/v1/tennis/matches/live` with a 60-second delay. |
| Quota metering | 1 request on WebSocket upgrade + 1 request per 15 seconds while the socket remains open. Pushed `POINT_UPDATE` and `tennis.odds.updated` frames cost 0 extra credits. |
| Forward compatibility | Always ignore unknown frame types and extra JSON fields so new live attributes never break your parser. |
Endpoints you can ship with
Compare live REST endpoints alongside wss://api.citoapi.com/api/v1/tennis/live/ws.
Odds & tick history
Live and upcoming prediction-market implied probabilities, decimal odds, volume metrics, and tick-by-tick price history back to November 2024.
- GET
/api/v1/tennis/odds/liveLive in-play prediction-market odds and volume.
- GET
/api/v1/tennis/odds/upcomingUpcoming matches with market odds and liquidity.
- GET
/api/v1/tennis/odds/{match_id}Current prediction-market odds for one match.
- GET
/api/v1/tennis/odds/{match_id}/liveReal-time live market snapshot for one match.
- GET
/api/v1/tennis/odds/{match_id}/historyTick-by-tick historical price series since Nov 2024.
Surface Elo
Point-in-time overall, Hard, Clay, and Grass Elo ratings and pre-match win probabilities across 2.1M+ matches back to 1968.
- GET
/api/v1/tennis/rankings/eloSurface and overall Elo leaderboard by tour and surface.
- GET
/api/v1/tennis/players/{player_id}/eloSingle player's surface Elo trajectory and recent match probabilities.
- GET
/api/v1/tennis/matches?include=stats,elo,oddsJoin serve stats, Elo ratings, and odds in one match list call.
Live scores
Every match in progress with the set scores, the game score, who is serving, and live match stats. Open one match for its full state.
- GET
/api/v1/tennis/matches/liveMatches in progress: sets, game score, server, and live stats.
- GET
/api/v1/tennis/matches/live/{match_id}One live match: every set, the current game, and both players' stats.
- GET
/api/v1/tennis/matches/{match_id}/statusScheduled, in progress, or finished, with the result once decided.
- GET
/api/v1/tennis/scheduleThe day's order of play across tours.
- GET
/api/v1/tennis/matches/upcomingScheduled matches, soonest first.
Results
Finished matches with the score of every set, the winner and loser, and the serve and return box score behind them.
- GET
/api/v1/tennis/matches/recentFinished matches, newest first, with set scores.
- GET
/api/v1/tennis/matches/completedEvery match completed on a given day.
- GET
/api/v1/tennis/matches/{match_id}One match: tournament, round, surface, score, and box score.
- GET
/api/v1/tennis/matches/{match_id}/statsAces, double faults, first-serve %, points won, break points.
- GET
/api/v1/tennis/matches?player_id=&year=&surface=The archive, filtered by player, opponent, year, surface, level or round.
Players
Player profiles with country, hand and birth date, career serve and return stats, recent form, and every match played.
- GET
/api/v1/tennis/players/search?q={name}Find a player by name and get their id.
- GET
/api/v1/tennis/players/{player_id}Name, country, hand, height, birth date and ranking.
- GET
/api/v1/tennis/players/{player_id}/statsCareer and season serve, return and win-loss stats.
- GET
/api/v1/tennis/players/{player_id}/formRecent results and win rate.
- GET
/api/v1/tennis/players/{player_id}/matchesThe player's match log, newest first.
Head-to-head
The full record between two players, split by surface and level, or a grid of records across a group of players.
- GET
/api/v1/tennis/h2h?player1_id=&player2_id=Wins, losses and every meeting between two players.
- GET
/api/v1/tennis/h2h/{player1_id}/{player2_id}The same record in path form.
- GET
/api/v1/tennis/h2h/matrix?player_ids=A head-to-head grid for several players at once.
Rankings
Weekly ATP and WTA singles rankings with points and movement, back through the decades, and any player's ranking history.
- GET
/api/v1/tennis/rankingsA full weekly ranking table for ATP or WTA.
- GET
/api/v1/tennis/rankings/topThe top N players of the latest list.
- GET
/api/v1/tennis/rankings/moversBiggest risers and fallers between two lists.
- GET
/api/v1/tennis/rankings/history/{player_id}One player's ranking, week by week.
- GET
/api/v1/tennis/rankings/datesEvery ranking date on file.
Tournaments
Tournaments from Grand Slams to ITF events, the season calendar, and the draw of any edition as a bracket.
- GET
/api/v1/tennis/tournamentsTournaments filtered by tour, level, surface and year.
- GET
/api/v1/tennis/tournaments/calendar?year=2026One season's tournament calendar.
- GET
/api/v1/tennis/tournaments/{tournament_id}One tournament: level, surface, location and editions.
- GET
/api/v1/tennis/tournaments/{tournament_id}/drawThe draw of the latest edition.
- GET
/api/v1/tennis/tournaments/{tournament_id}/editions/{year}/drawThe draw of any past edition.
Leaderboards
Season leaders for the stats that decide matches, computed from every match box score.
- GET
/api/v1/tennis/leaderboards/acesMost aces in the season.
- GET
/api/v1/tennis/leaderboards/1st-serve-wonBest first-serve points won %.
- GET
/api/v1/tennis/leaderboards/break-conversionBest break-point conversion.
- GET
/api/v1/tennis/leaderboards/tiebreak-win-pctBest tiebreak record.
- GET
/api/v1/tennis/leaderboards/comeback-winsMost wins after losing the first set.
Coverage
What the dataset holds: tours, levels, ITF and junior coverage, and the years on file.
- GET
/api/v1/tennis/coverageTours, levels, year range, ITF and junior event counts.
- GET
/api/v1/tennis/competitionsEvery competition with its tour and level.
FAQs
Auth, rooms, metering, and plan tiers
Can't find what you're looking for? Contact our customer support team
More real-time & docs pages
- Tennis WebSocket docsConnect, rooms, POINT_UPDATE and odds frames on WSS.
- Tennis point-by-point APIPoint timelines, live point updates and set-level fallback.
- Tennis live score APISet, game and server for every match in progress.
- Tennis odds APILive, pre-match and tick-by-tick odds across 6 books/markets.
- Tennis APILive scores, results, rankings, Elo, odds and head-to-head on one key.
- Tennis API docsEvery endpoint, its parameters, and a real response.
Push every point and tick into live scoreboards
Test the live board free, then stream real-time points and odds over one socket.