Sports Channel (WebSocket)
Overview
Section titled “Overview”Provide one or more game_id values to start receiving score events for those games. Events include current score, match period, elapsed time, and end-of-game indicators.
Server: wss://ws.openfish.fun/ws/sports
Subscribe
Section titled “Subscribe”Direction: Client -> Server
| Field | Type | Required | Description |
|---|---|---|---|
game_ids | array of strings | Yes | Game IDs to subscribe to |
type | string | Yes | Must be "sports" |
{ "game_ids": ["mci-liv-2025-02-03"], "type": "sports"}Update Subscription
Section titled “Update Subscription”{ "operation": "subscribe", "game_ids": ["nyk-bos-2026-04-10"]}Heartbeat
Section titled “Heartbeat”Server sends ping every 5 seconds. Client must respond with pong within 10 seconds.
Events
Section titled “Events”Sports Score Update
Section titled “Sports Score Update”Each event describes the current state of a match that the client is tracking.
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Game identifier (e.g. "mci-liv-2025-02-03") |
live | boolean | No | Whether the match is in progress |
ended | boolean | No | Whether the match has ended |
score | string | No | Current score (e.g. "2-1") |
period | string | No | Current period (see below) |
elapsed | string | No | Elapsed time ("MM:SS") |
last_update | string | No | ISO 8601 timestamp |
finished_timestamp | string | No | ISO 8601 end time (only for ended matches) |
turn | string | No | Team with possession (NFL only) |
Period Values by Sport
Section titled “Period Values by Sport”| Sport | Values |
|---|---|
| Soccer | 1H, 2H, HT, FT, PEN |
| NFL | Q1-Q4, HT, OT, FT |
| NBA/CBB | Q1-Q4, HT, OT, FT |
| MLB | Top 1st, Bot 1st, … |
| Ice Hockey | P1, P2, P3, OT, PEN, FT |
Sample Message:
{ "slug": "mci-liv-2025-02-03", "live": true, "ended": false, "score": "1-0", "period": "1H", "elapsed": "32:15", "last_update": "2025-02-03T19:50:16.939Z"}