Skip to content

Live status socket of a match

GET
/ws/match/{id}
curl --request GET \
--url https://foxleague.ai/ws/match/1

A WebSocket that reports a match’s status while it is played. Each message is a JSON object with match_id and status; home_score and away_score appear only once the result is public. A failed match sends status: "error" with error: "The match could not be played.". The socket closes after finished or error.

  • A ranked or casual match: its two players only. Open it with ?ticket= from POST /api/notifications/ws-ticket (single use, valid 30 seconds). The first message is the current status, then each change until the match is over (rcg_ready when its broadcast can start). The score is never sent before the result applies.
  • A tournament or challenge match (or an unknown id): no ticket needed. The socket sends {"match_id": <id>, "status": "pending"} and closes, before and after the match’s broadcast: a tournament match is followed by its public id (GET /api/public/tournament-match/{id}).

Who: anyone for a tournament or challenge match; for a ranked or casual match, its two players with a ticket.

Rate limit: a cap on the sockets open at once from one network address; past it the upgrade answers 429.

id
required
integer format: int32

The match id.

ticket
string

A single-use ticket from POST /api/notifications/ws-ticket, valid 30 seconds. Needed for a ranked or casual match: the ticket’s player must be one of its two players.

The socket is open.

A ranked or casual match opened without a valid ticket of one of its two players. The body is plain text: invalid or expired ticket.

Too many sockets are open from your network address. The body is empty.

The server could not read the match. The body is plain text.