{% from "_macros.html" import bar, pct, venue_chips, new_badge, source_note %} {# One sport's body on the Markets board, loaded when its section is opened (views.board_sport). #} {% macro sync_flags(u) %}{% set stale = (u.sync or [])|selectattr("stale")|list %}{% if stale %}
{% for v in stale %}{{ v.name }}: {% if not v.links %}no markets linked{% elif v.hours is none %}never synced{% elif v.hours < 48 %}synced {{ '%.0f'|format(v.hours) }} h ago{% else %}synced {{ '%.0f'|format(v.hours / 24) }} days ago{% endif %}{% endfor %}
{% endif %}{% endmacro %} {% if s.run or s.tape or s.asof %}
{% if s.run %} {% for u in s.upcoming %}

{{ u.info.title }}{% if u.new %} {{ new_badge(u.new) }}{% endif %}

{{ u.info.start_date|fmt }} · {% if u.info.status == 'completed' %}resolved{% if u.winner %} · winner {{ u.winner }}{% endif %}{% elif u.info.status == 'in_progress' %}in progress{% else %}{{ u.countdown }}{% endif %}{% if u.next %} · next{% endif %}
{{ venue_chips(u.venues, u.mine) }} {{ sync_flags(u) }}
{% for o in u.top %}
{{ o.subject }}{{ bar(o.fair, o.pm_mid, "", (o.venues.kalshi.mid if o.venues and o.venues.kalshi else none)) }}{{ pct(o.fair) }}
{% endfor %}
win probability{% if u.top and u.top[0].pm_mid is not none %} · Polymarket{% endif %}
{{ u.outcomes }} outcomes →
{% endfor %}

{{ s.run.season }} championship{% if s.season.new %} {{ new_badge(s.season.new) }}{% endif %}

season-long markets
{{ venue_chips(s.season.venues, s.season.mine) }}
{% for o in s.season.top %}
{{ o.subject }}{{ bar(o.fair, o.pm_mid, "", (o.venues.kalshi.mid if o.venues and o.venues.kalshi else none)) }}{{ pct(o.fair) }}
{% endfor %}
champion probability{% if s.season.top and s.season.top[0].pm_mid is not none %} · Polymarket{% endif %}
{% if s.season.constructors %}
Constructors: {% for o in s.season.constructors %}{{ o.subject }} {{ pct(o.fair) }}{{ " · " if not loop.last }}{% endfor %}
{% endif %}
{{ s.season.outcomes }} outcomes →
{% elif s.asof %} {% for u in s.upcoming %}

{{ u.info.title }}

{{ u.info.start_date|fmt }} · {% if u.info.status == 'completed' %}resolved{% if u.winner %} · winner {{ u.winner }}{% endif %}{% else %}{{ u.countdown }}{% endif %}{% if u.next %} · next{% endif %}
{{ venue_chips(u.venues, u.mine) }} {{ sync_flags(u) }} {% if u.info.status != 'completed' %}
no fair price yet: the model prices this race once a forecast is stored
{% endif %}
{{ u.outcomes }} outcomes →
{% else %}
No upcoming race in the calendar.
{% endfor %} {% elif s.tape %} {% for u in s.upcoming %}

{{ u.title }}

{{ u.date|fmt if u.date else "undated" }} · {{ u.status }}
{% if u.exchanges %}
{% for x in u.exchanges %}{{ x }}{% endfor %}
{% endif %} {% if u.url %}
Open tape →
{% endif %}
{% endfor %} {% endif %}
{% if (s.run or s.asof) and s.later %}

Later: {% for l in s.later[:6] %}{{ l.title }}{% if l.new %} {{ new_badge(l.new) }}{% endif %} {{ l.date|fmt }}{{ " · " if not loop.last }}{% endfor %}{% if s.later|length > 6 %} · +{{ s.later|length - 6 }} more{% endif %}

{% endif %} {% if s.tape and s.later %}

Later: {% for l in s.later[:6] %}{% if l.url %}{{ l.title }}{% else %}{{ l.title }}{% endif %}{% if l.date %} {{ l.date|fmt }}{% endif %}{{ " · " if not loop.last }}{% endfor %}{% if s.later|length > 6 %} · +{{ s.later|length - 6 }} more on Recorded tapes →{% endif %}

{% endif %} {% if (s.run or s.asof) and s.recent %}

Recent results

the last races: the winner and what we had before the race

Loading…

{% endif %} {% endif %} {% if s.exchanges %}
Exchange data{% if not s.run %} (no model: market data only){% endif %}
{% for b in s.exchanges %} {% for n in (b.trades, b.prices, b.books) %} {% endfor %} {% endfor %}
ExchangeMarketsOpenVolumeTradesPrice pointsBooksSynced
{% if b.url %}{{ b.exchange_name }}{% else %}{{ b.exchange_name }}{% endif %} {{ b.markets }}{{ b.open }}{{ "{:,.0f}".format(b.volume) }}{{ "{:,}".format(n) if n else "n/a" }}{{ b.synced|fmt }}

Counts are every row each exchange's feed has given us (archive and live buffer), never paper or demo trades. n/a: nothing stored. {% for b in s.exchanges if b.coverage %}{{ b.coverage }}{{ " " if not loop.last }}{% endfor %}

{% endif %} {{ source_note(s.code, s.exchanges, s.run, (s.asof.at if s.asof else none), model=(s.asof is not none)) }}