Esports WebSocket API.
Subscribe to a match. Get every change pushed.
Why this surface exists
Polling a live board every second wastes requests and still lags. A socket sends only what changed, the moment it changes.
What the record represents
Every message has op. Updates add sport, game_id, type, ts and data, so one handler can route frames, box scores, odds and status.
Core endpoints
Connect to WS /v7/live/ws with an x-api-key header, or with ?ticket= from POST /v7/ws-ticket in a browser.
| Endpoint | Purpose | Key filters |
|---|---|---|
| WS /v7/live/ws | Live pushes for the matches you subscribe to | Builder+ |
| POST /v7/ws-ticket | Short ticket for browsers that cannot set headers | Builder+ |
| subscribe game_id=* | Every live match in a title | Pro+ |
| subscribe board=lines | Pushed changes to the lines board (props for props) | Builder+ |
Canonical IDs
- : game_id is a kr_match_id
- : player_id in box scores is kr_pl_*
- : the same IDs as /v7/{sport}/live and /props
Sample payload
A frame update pushed for a live CS2 match, trimmed from a real message.
| Field | Example | Used for |
|---|---|---|
| op | hello | snapshot | update | Message kind |
| type | frame | boxscore | odds | status | What changed, on update |
| game_id | kr_cs2_… | The match, as a KashRock ID |
| data | the changed state | Score, players, odds or status |
{
"op": "update",
"sport": "cs2",
"game_id": "kr_cs2_forze-reload-vs-wbt-academy-22-11-2026",
"type": "frame",
"ts": "2026-11-22T11:57:46.689320+00:00",
"data": {
"state": "live",
"upstream_ts": "2026-11-22T11:57:38+00:00",
"blue": {
"kills": 0,
"map_score": 0,
"series_score": 2
},
"red": {
"kills": 1,
"map_score": 0,
"series_score": 0
}
}
}Comparing sources
The socket pushes the same live state that GET /v7/{sport}/live returns, so you can poll first and switch later.
| Source | Schema | Best use |
|---|---|---|
| Polling /live | One request per tick | Simple dashboards |
| WebSocket | One connection, pushed changes | Live apps and alerts |
| MCP get_live_ws | Returns the URL, auth and subscribe messages | Agents that hand off to code |
How to use it
Live pushes are not settlement. Grade props from /v7/{sport}/results after the match.
Operational practices
- : Send {"op":"ping"} to keep the socket open
- : Reconnect and resubscribe on close
- : Keep the key on your server
Quick reference
WS /v7/live/ws, then {"op":"subscribe","sport":"cs2","game_id":"<kr_match_id>"}. Get your free key.
Start Building
- 1. Get a free key. Sandbox needs no card and reads props and matches on every title. Get A Free Key
- 2. Make the first call.
curl -H "x-api-key: $KASHROCK_API_KEY" \ "https://kashrock.up.railway.app/v7/cs2/matches?status=upcoming&limit=5" - 3. Pick a guide. Quickstart, Player Props, Live Data, Odds And Lines, WebSockets, MCP For AI Agents. Using an AI agent? Set it up here.
- 4. Coming from another API? KashRock vs Cito API, KashRock vs PandaScore, KashRock vs OpticOdds, KashRock vs The Odds API. Plans and limits are on the Pricing Page.
If you need a normalized feed instead of another UI wrapper, the esports api exposes live boards, schedules, and history on one schema: with the IDs and outcome patterns that keep backtests and grading honest. Start free on Sandbox, or see published pricing.