Relay
Real-time WebSocket API for live match data
The Relay is a WebSocket server at wss://relay.clipfarm.watch that pushes live match schedule updates. It's what the live viewer uses under the hood to show real-time scores and queuing status.
Nexus endpoint
Streams real-time match schedule data sourced from FTC Nexus: queue status, team assignments, timing, announcements, and parts requests.
wss://relay.clipfarm.watch/ws/nexus/:eventKeyNo authentication required. Connect and you'll immediately receive a full event-status snapshot, followed by match-status deltas as individual matches update.
Messages
All messages are JSON with a type field.
event-status
Sent immediately on connect and whenever the full event state changes. Treat this as a snapshot — it replaces your local state.
{
"type": "event-status",
"data": {
"eventKey": "USTNCMP",
"dataAsOfTime": 1711900800000,
"nowQueuing": "Qualification 12",
"matches": [
{
"label": "Qualification 12",
"status": "Now queuing",
"redTeams": ["23396", "10355"],
"blueTeams": ["8417", "14270"],
"times": {
"scheduledStartTime": 1711901400000,
"estimatedStartTime": 1711901460000,
"actualOnFieldTime": null
},
"breakAfter": null,
"replayOf": null
}
],
"announcements": [
{
"id": "ann_001",
"announcement": "Lunch break at 12:30",
"postedTime": 1711898000000
}
],
"partsRequests": []
}
}match-status
Sent when a single match updates. Patch the match by label in your local state.
{
"type": "match-status",
"data": {
"eventKey": "USTNCMP",
"dataAsOfTime": 1711901500000,
"match": {
"label": "Qualification 12",
"status": "On field",
"redTeams": ["23396", "10355"],
"blueTeams": ["8417", "14270"],
"times": {
"actualOnFieldTime": 1711901500000
}
}
}
}Match status values
| Value | Meaning |
|---|---|
Queuing soon | Match is coming up |
Now queuing | Teams should head to queuing |
On deck | Teams are staged near the field |
On field | Match is running or about to start |
Reconnection
The Relay does not guarantee message delivery across disconnects. On reconnect you'll receive a fresh event-status snapshot — use that to rebuild state rather than relying on a diff.
Recommended backoff: 1s, 2s, 4s, 8s, capped at 30s.
Quick example
// Nexus — no auth required
const ws = new WebSocket('wss://relay.clipfarm.watch/ws/nexus/USTNCMP');
ws.onmessage = ({ data }) => {
const msg = JSON.parse(data);
if (msg.type === 'event-status') {
// Full snapshot — replace local state
console.log('Now queuing:', msg.data.nowQueuing);
console.log('Matches:', msg.data.matches);
}
if (msg.type === 'match-status') {
// Delta — patch the match with msg.data.match.label
console.log('Updated match:', msg.data.match);
}
};