Skip to content

betting_combat.consumers.cito.schemas

Typed views of the Cito UFC API responses the live round feed reads.

Cito serves UFC’s FightMetric live feed (the UFC app’s, read by imitating the iOS app: it can break or be cut off without notice) as hash-diffed snapshots per bout, ~5-10 s apart while a round runs, each carrying every round so far per fighter (roundStats). Names are Cito’s camelCase on the wire and snake_case here; one fighter-round’s stats map onto the round datasets’ names (rounds.features.breaks.FIELDS) through ROUND_FIELDS.

Plans below Pro see the live endpoints 60 s late, and the first call for a feed only starts its delayed copy: an empty answer with delayed.ready false (SnapshotPage.warming), counted against the quota like any call. Receipts for every shape: tests/fixtures/cito (recorded 2026-10-25 with the free key; research data/ufc/cito/CATALOG.md).

Classes

BoutFighter

Bases: _Model

CitoBout

Bases: _Model

One bout of a card (/ufc/events/{slug}/bouts). id is the listing’s key (a FightMetric number, ‘uuid-…’ or a name slug); data_id the FightMetric id the live worker tracks (/ufc/live/events chronoFmids); live_bout_id (liveBoutId, listed since 2026-11-07) the ONLY id the live endpoints answer to when Cito lists it: on 11-07 every look by id or data_id came back empty and every break priced without stats.

corner

corner(side: str) -> BoutFighter | None

CitoEvent

Bases: _Model

One card (/ufc/events/upcoming, /ufc/events/recent).

Corner

Bases: _Model

Delayed

Bases: _Model

The plan’s delay notice: ready false while the feed’s delayed copy warms up.

FighterRounds

Bases: _Model

One fighter’s lines of every round so far (roundStats[]).

round

round(round_no: int) -> RoundLine | None

FighterTotals

Bases: _Model

One fighter’s running fight totals (liveStats[]).

LiveBout

Bases: _Model

/ufc/live/{boutId}: the live state (None while the delayed copy warms) and the bout’s card entry.

from_api

from_api(raw: dict[str, Any]) -> LiveBout

LiveEvent

Bases: _Model

A card the live worker tracks (/ufc/live/events): its bouts’ FightMetric ids in order and the one live now.

LivePayload

Bases: _Model

A snapshot’s body: the bout’s state and every round’s running line.

LiveSnapshot

Bases: _Model

One hash-diffed snapshot of a bout (/ufc/live/{boutId}/snapshots).

rounds_of

rounds_of(corner: str) -> FighterRounds | None

LiveState

Bases: _Model

/ufc/live/{boutId}’s state: the clock, the corners, the fight totals.

RoundLine

Bases: _Model

One fighter’s running stats in one round (roundStats[].rounds[]).

stats

stats() -> dict[str, float] | None

The round datasets’ 22 stats (ROUND_FIELDS) as floats; None when any is missing.

SnapshotPage

Bases: _Model

/ufc/live/{boutId}/snapshots?limit=n: the newest n snapshots, newest first.

from_api

from_api(raw: dict[str, Any]) -> SnapshotPage

Functions

clock_seconds

clock_seconds(value: Any) -> float | None

A Cito clock or control time (‘4:54’) in seconds; a number passes; None when absent or unreadable.