Automatically updates a subreddit's sidebar standings — both the new-Reddit TextArea widget and the old-Reddit wiki config/sidebar — with standings for your configured team's sport. Registered sports are MLB, NBA, NHL, and NFL. A Devvit cron task polls every 5 minutes; the orchestrator writes a fresh update when settings change, when the operator's template wiki page content changes, or every hour otherwise. App upgrade triggers an immediate update.
After you configure the sport and matching per-sport team dropdown (mlbTeamId / nflTeamId / nhlTeamId / nbaTeamId), the app runs a periodic fetch-render-write pipeline and writes standings to:
widgetName setting, default "Standings")config/sidebar wiki page, replacing the content between [](/redball/standings) markers (or appending a new marker-wrapped block if none exists)Both surfaces update independently — a failure on one does not block the other. When fresh standings are unavailable for any reason (API outage, off-season, shape change), the previously published content is preserved; the app never blanks your sidebar.
The app manages up to three independent content sections, each writing into config/sidebar:
| Section | Sports | Default | Enable setting |
|---|---|---|---|
| Standings | All (MLB, NFL, NHL, NBA) | On (controlled by enableWiki) |
enableWiki |
| Schedule | MLB only | Off | enableSchedule |
| Stats | MLB only | Off | enableStats |
Each section is independently enabled and independently ordered — the section appears wherever you place its marker pair in config/sidebar. You can have standings at the top, schedule in the middle, and stats at the bottom, or any arrangement you want.
The schedule and stats sections are wiki-only (old Reddit config/sidebar). Standings also writes to the new-Reddit TextArea widget. The wiki write is a single read-modify-write of config/sidebar that splices all enabled sections in one operation — your sidebar is never over-written section by section.
Each section is delimited by a marker pair in config/sidebar. Markers are wiki-internal — the app writes them around the section content at write time. You do not put them in your Liquid templates, and you do not need to write them by hand for the standings section (it auto-appends if missing).
For the schedule and stats sections, you must place the marker pair manually where you want that section to appear. The marker is the same token used as both the open and close delimiter:
| Section | Marker token |
|---|---|
| Standings | [](/redball/standings) |
| Schedule | [](/redball/schedule) |
| Stats | [](/redball/stats) |
Example config/sidebar layout (standings on top, schedule below, stats at the bottom):
[](/redball/standings)
... bot-managed standings content ...
[](/redball/standings)
... your other sidebar content ...
[](/redball/schedule)
... bot-managed schedule content ...
[](/redball/schedule)
... more sidebar content ...
[](/redball/stats)
... bot-managed stats content ...
[](/redball/stats)
The app replaces only the content between each marker pair and preserves everything outside. If a section fails to render or is disabled, its existing marker block is left untouched.
sidebar-standing from the Devvit app directory on your subreddit.sport and the matching per-sport team dropdown (mlbTeamId for MLB, nflTeamId for NFL, etc.). Both are required; there are no defaults. Optionally set localTimezone to your preferred IANA zone (defaults to UTC).sidebar_updater deployment: the existing [](/redball/standings) marker block in your old-Reddit sidebar is picked up automatically on the first update — no manual sidebar editing required. After confirming the Devvit app works, disable your redball sidebar_updater deployment for this sub.A subreddit moderator can trigger an immediate standings re-render at any time from the Reddit mod menu:
The action runs the full fetch-render-write pipeline immediately, bypassing the change-aware throttle (which normally suppresses re-renders when nothing relevant has changed and the last update was under one hour ago). A toast notification reports the outcome:
sport or the matching team ID setting is not configured; the standings API returned no data (off-season or transient outage); the template rendered empty content. Check app settings and logs.Preserve-on-no-data still applies: if fresh standings are unavailable for any reason, the previously published sidebar content is preserved — this action never blanks your sidebar (SU7 behavior).
This action is moderator-only. It does not affect the automatic cron schedule — the next scheduled update fires at the next cron tick regardless.
| Setting | Default | Description |
|---|---|---|
sport |
(required — no default) | Sport for this sub: mlb, nfl, nhl, or nba. |
mlbTeamId / nflTeamId / nhlTeamId / nbaTeamId |
(required — no default) | Per-sport team dropdown for standings filtering. Only the dropdown matching the configured sport is consulted at runtime. |
localTimezone |
"America/New_York" |
Curated dropdown of US timezones plus UTC, used to format the standings "Updated" timestamp. Options: Eastern, Central, Mountain, Mountain–Phoenix (no DST), Pacific, Alaska, Hawaii, UTC. |
enableWidget |
true |
Update (or create) the new-Reddit TextArea widget. |
enableWiki |
true |
Update the old-Reddit config/sidebar wiki page. |
widgetName |
"Standings" |
Short name of the TextArea widget to update or create. Match your existing widget name to avoid creating a duplicate (e.g. Eagles use "2024 Division Standings"). |
widgetBgColor |
"" |
Optional hex background color for the widget (e.g. #014980). Empty = Reddit default styling. |
widgetHeaderColor |
"" |
Optional hex header color for the widget. Empty = Reddit default styling. |
enableSchedule |
false |
Enable the schedule section (MLB only). When true, the bot updates the [](/redball/schedule) marker block in config/sidebar with the current month's schedule. Has no effect for NFL/NHL/NBA. The marker pair must already exist in config/sidebar where you want the schedule to appear. |
enableStats |
false |
Enable the stats section (MLB only). When true, the bot updates the [](/redball/stats) marker block in config/sidebar with team stat leaders. Has no effect for NFL/NHL/NBA. The marker pair must already exist in config/sidebar. |
standingsTemplateWikiPage |
"" (blank — uses app default) |
Wiki page name for the Liquid template used when rendering the old-Reddit sidebar standings section. Leave blank to use sidebar-standing/default-{sport}-standings (seeded automatically). Set a wiki page name to point at a custom template. |
standingsTemplateWidgetPage |
"" (blank — uses app default) |
Wiki page name for the Liquid template used when rendering the new-Reddit widget. Leave blank to use sidebar-standing/default-{sport}-standings. Operators with different old/new templates (e.g. r/Flyers) point this at a separate custom page. |
scheduleTemplateWikiPage |
"" (blank — uses app default) |
Wiki page name for the Liquid template for the schedule section. Leave blank to use sidebar-standing/default-{sport}-schedule (seeded automatically). Set a wiki page name to point at a custom template. Only consulted when enableSchedule is true. MLB only. |
statsTemplateWikiPage |
"" (blank — uses app default) |
Wiki page name for the Liquid template for the stats section. Leave blank to use sidebar-standing/default-{sport}-stats (seeded automatically). Set a wiki page name to point at a custom template. Only consulted when enableStats is true. MLB only. |
sidebar-standing/ wiki folderAll bot-managed default template pages live under the sidebar-standing/ wiki path:
| Page | Purpose |
|---|---|
sidebar-standing/default-mlb-standings |
Default MLB standings template (bot-owned) |
sidebar-standing/default-mlb-schedule |
Default MLB schedule template (bot-owned) |
sidebar-standing/default-mlb-stats |
Default MLB stats template (bot-owned) |
sidebar-standing/default-nfl-standings |
Default NFL standings template (bot-owned) |
sidebar-standing/default-nhl-standings |
Default NHL standings template (bot-owned) |
sidebar-standing/default-nba-standings |
Default NBA standings template (bot-owned) |
Bot-owned pages are refreshed on every app upgrade. Do not edit them directly — your edits will be overwritten. To customize, create your own page with a different name and point the relevant *TemplateWikiPage setting at it.
Recommended naming for custom pages: keep your custom pages under sidebar-standing/ for organization. For example, a Phillies custom standings template might live at sidebar-standing/phillies-standings. This keeps all sidebar-standing-related wiki pages grouped together in the wiki index.
The app uses [](/redball/standings) as the begin/end marker in the old-Reddit config/sidebar wiki page. This is the same marker token redball's sidebar_updater uses, which means:
[](/redball/standings) block (placed by redball), the app finds it on first run and replaces it without any operator intervention.Operators do NOT add these markers manually. They are wiki-write-internal — the app inserts them around the rendered standings content at write time. Custom Liquid templates do NOT include them — your template emits pure standings content; the markers are handled by the app.
Data source endpoints:
https://statsapi.mlb.com/api/v1/standings?leagueId=103,104&season=YYYY&standingsTypes=regularSeasonhttps://statsapi.mlb.com/api/v1/schedule?sportId=1&teamId={id}&startDate=...&endDate=...&hydrate=broadcasts(all),linescore,teamhttps://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting|pitching&gameType=R&season=YYYY&teamId={id}&playerPool=All&hydrate=personTeam IDs are MLB StatsAPI numeric IDs (for example 143 for Philadelphia Phillies). Standings are filtered to the configured team's division (for example NL East).
Default MLB template renders:
{{ divisionShortName }} Standings)Team | W | L | GB^Updated: {{ updatedAt }} — Reddit-supertext line that displays the timestamp in the operator's configured localTimezone with the IANA short zone abbreviation appended; non-breaking spaces inside the formatted value keep the entire supertext run unbroken)mlbTeamId is wrapped in markdown **...**. Custom templates can change emphasis style by replacing the {% if row.isMyTeam %}…{% else %}…{% endif %} branch (see Available Liquid variables below for row.isMyTeam).MLB team subreddit links come from static MLB_TEAMS mappings. If a team has no mapping, row.teamSubreddit is null and link rendering may be empty/broken in custom templates.
Team IDs are ESPN numeric IDs. Standings filter by conference (East or West — the only sport that is not division-level). Data source: site.api.espn.com (ESPN's community-discovered API; not stats.nba.com which is blocked by anti-bot TLS enforcement).
Data source endpoint:
https://site.api.espn.com/apis/v2/sports/basketball/nba/standings?region=us&lang=en&season=YYYY&type=0&limit=100Default NBA template renders:
**{{ conferenceName }} Standings**)Team | W | L | PCT | GB^Updated: {{ updatedAt }} — Reddit-supertext-safe, timezone-aware timestamp){% if row.isMyTeam %}...{% endif %}.Team IDs are NHL API three-letter abbreviations (for example PHI for Philadelphia Flyers). Standings filter by division. Data source: api-web.nhle.com.
Data source endpoint:
https://api-web.nhle.com/v1/standings/nowDefault NHL template renders:
**{{ divisionName }} Division**)Team | W | L | OTL | PTS^Updated: {{ updatedAt }} — Reddit-supertext-safe, timezone-aware timestamp){% if row.isMyTeam %}...{% endif %}.Team IDs are ESPN numeric IDs (for example 21 for Philadelphia Eagles). Standings filter by division. Data source: site.api.espn.com.
Data source endpoint:
https://site.api.espn.com/apis/v2/sports/football/nfl/standings?region=us&lang=en&season=YYYY&type=2&limit=100The NFL standings response includes two conference groups in children[] (AFC and NFC). Each conference has a flat standings.entries[] list (16 teams) with no nested division sub-groups. Division assignment is derived from the static NFL_TEAMS map, then the module selects the configured team's division.
Why the app renders division standings (not full conference standings):
Default NFL template renders:
**{{ divisionName }} Standings**)Team | W | L | T | PCT^Updated: {{ updatedAt }} — Reddit-supertext-safe, timezone-aware timestamp){% if row.isMyTeam %}...{% endif %}.By default, the app renders each section using a per-sport built-in Liquid template. To customize the output, create a wiki page on your subreddit with your own Liquid template content, then point the relevant *TemplateWikiPage setting at that page name.
The built-in default pages are bot-owned and refreshed on every app upgrade — do not edit them directly. Any edits to sidebar-standing/default-{sport}-{section} will be overwritten. Use a custom page name (recommended: keep under sidebar-standing/ for organization, e.g. sidebar-standing/phillies-standings).
If you have existing redball Mako templates, the syntax is similar but not identical:
| Mako | Liquid equivalent |
|---|---|
<% if condition: %> |
{% if condition %} |
<% endif %> |
{% endif %} |
<% for item in list: %> |
{% for item in list %} |
<% endfor %> |
{% endfor %} |
${variable} |
{{ variable }} |
${variable | default('fallback')} |
{{ variable | default: 'fallback' }} |
These variables are available in every section template:
| Variable | Type | Example | Description |
|---|---|---|---|
subreddit |
string | Phillies |
Subreddit name (no r/ prefix) |
updatedAt |
string | 06/12/2026 4:05 PM EDT |
Render timestamp formatted in the operator's localTimezone. Pre-formatted with separators for Reddit supertext compatibility. |
season(integer year) is available in all three sections. The schedule section also exposesyearas an alias forseason(identical value). See the per-section tables below.
Standings templates receive the full standings table for your team's division (or conference for NBA). All sports expose rows plus sport-specific header fields. Markers ([](/redball/standings)) are NOT in templates.
| Variable | Type | Example | Description |
|---|---|---|---|
rows |
array | — | Standings rows for the division/conference, sorted by rank |
rows[].teamName |
string | Phillies |
Short team display name |
rows[].teamSubreddit |
string or null | /r/Phillies |
Subreddit path (with leading /r/) or null |
rows[].wins |
number | 37 |
Wins |
rows[].losses |
number | 31 |
Losses |
rows[].isMyTeam |
boolean | true |
true for the configured team's row; use to apply emphasis |
| Variable | Type | Example | Description |
|---|---|---|---|
season |
number | 2026 |
Season year |
divisionId |
number | 204 |
MLB StatsAPI division ID |
divisionName |
string | National League East |
Full division name |
divisionShortName |
string | NL East |
Short division name |
rows[].teamId |
number | 143 |
MLB team ID |
rows[].gamesBack |
string | -, 8, 10.5 |
Games back |
rows[].divisionRank |
string | "1", "2" |
Division rank |
rows[].pct |
string | .612 |
Winning percentage (leading zero stripped) |
rows[].lastTen |
string | 6-4 |
Record over last 10 games |
rows[].streak |
string | W3, L1 |
Current streak code |
rows[].homeRecord |
string | 21-17 |
Home record as W-L |
rows[].roadRecord |
string | 12-20 |
Road record as W-L |
rows[].runDiff |
number | 45 |
Run differential (signed integer) |
| Variable | Type | Example | Description |
|---|---|---|---|
conferenceName |
string | Eastern Conference |
Full conference name |
rows[].teamId |
string | "6" |
ESPN team ID |
rows[].pct |
string | .610 |
Win percentage |
rows[].gamesBehind |
string | -, 2.0 |
Games behind |
| Variable | Type | Example | Description |
|---|---|---|---|
divisionName |
string | Metropolitan |
Full division name |
rows[].teamId |
string | PHI |
Team abbreviation |
rows[].otLosses |
number | 5 |
Overtime losses |
rows[].points |
number | 89 |
Points |
| Variable | Type | Example | Description |
|---|---|---|---|
divisionName |
string | NFC East |
Full division name |
rows[].teamId |
string | "21" |
ESPN team ID |
rows[].ties |
number | 0 |
Ties |
rows[].pct |
string | .706 |
Win percentage |
rows[].pointDifferential |
number | 120 |
Point differential (may be absent) |
The schedule section is wiki-only and MLB-only. Enable with enableSchedule: true. Place [](/redball/schedule) marker pair in config/sidebar. Markers are NOT in templates.
| Variable | Type | Example | Description |
|---|---|---|---|
grid |
string | (pre-rendered table) | Pre-rendered 7-column Sun–Sat markdown calendar. Use this for most custom templates. Home games bold, away games italic, off-days bare superscript. |
weeks |
array | — | Structured primitive grid for full-custom layouts (e.g. CSS-flair schedules). Each element is a week object. |
weeks[w].days |
array | — | Array of 7 day objects (or null for padding cells outside the month). |
weeks[w].days[d].dayNum |
number | 12 |
Calendar day number (1–31) |
weeks[w].days[d].isOffday |
boolean | true |
true if no game scheduled this day |
weeks[w].days[d].games |
array | — | Array of game objects (0 for off-days, 1 for normal days, 2 for doubleheaders) |
weeks[w].days[d].games[g].isHome |
boolean | true |
true for home games |
weeks[w].days[d].games[g].opponentId |
number | 143 |
MLB team ID of opponent |
weeks[w].days[d].games[g].opponentName |
string | Padres |
Opponent short name |
weeks[w].days[d].games[g].opponentSub |
string or null | /r/Padres |
Opponent subreddit path or null |
weeks[w].days[d].games[g].isFinal |
boolean | true |
true for completed games |
weeks[w].days[d].games[g].won |
boolean or null | true |
Outcome from configured team's perspective; null if not final |
weeks[w].days[d].games[g].runsFor |
number or null | 5 |
Configured team's runs; null if not final |
weeks[w].days[d].games[g].runsAgainst |
number or null | 2 |
Opponent's runs; null if not final |
weeks[w].days[d].games[g].timeText |
string or null | 7:05 |
Local scheduled start time (H:MM, no am/pm); populated for all game states (final, live, and future). null only if the start time cannot be determined. |
weeks[w].days[d].games[g].broadcasts |
string[] | ["NBCSP", "FS1"] |
TV call-signs (type=TV, en, team-side only) |
monthName |
string | June |
Full month name |
monthNum |
number | 6 |
Month number 1–12 |
year |
number | 2026 |
Season year |
season |
number | 2026 |
Season year — same value as year. Available for template consistency across sections. |
teamName |
string | Phillies |
Configured team's short name |
updatedAt |
string | 06/12/2026 6:40 PM EDT |
Render timestamp |
Important notes:
rescheduleDate) are automatically filtered out. They re-appear on the new date.The stats section is wiki-only and MLB-only. Enable with enableStats: true. Place [](/redball/stats) marker pair in config/sidebar. Markers are NOT in templates.
| Variable | Type | Example | Description |
|---|---|---|---|
season |
number | 2026 |
Season year — use in headers like ## {{ season }} Team Leaders. |
hitting |
array | — | Hitting category objects, one per category, in order |
hitting[i].key |
string | HR, AVG, OPS |
Machine key |
hitting[i].label |
string | HR, AVG, OPS |
Display label (same as key) |
hitting[i].leaders |
array | — | Up to 5 leaders sorted best-first |
hitting[i].leaders[j].name |
string | P Alonso |
Player display name ("First-initial Last") |
hitting[i].leaders[j].value |
string | 15, .263, 1.380 |
Formatted stat value |
pitching |
array | — | Pitching category objects, same shape as hitting |
record |
object | — | Team record object |
record.home |
object | — | Home record |
record.home.wins |
number | 21 |
Home wins |
record.home.losses |
number | 17 |
Home losses |
record.road |
object | — | Road record |
record.road.wins |
number | 12 |
Road wins |
record.road.losses |
number | 20 |
Road losses |
record.total |
object | — | Overall record |
record.total.wins |
number | 33 |
Total wins |
record.total.losses |
number | 37 |
Total losses |
updatedAt |
string | 06/12/2026 6:40 PM EDT |
Render timestamp |
Hitting category index reference (for direct index access in top-N paired templates):
| Index | Key | Category |
|---|---|---|
hitting[0] |
H | Hits (all players) |
hitting[1] |
XBH | Extra-base hits = 2B+3B+HR (all players) |
hitting[2] |
HR | Home runs (all players) |
hitting[3] |
RBI | RBI (all players) |
hitting[4] |
BB | Walks (all players) |
hitting[5] |
SB | Stolen bases (all players) |
hitting[6] |
AVG | Batting average (qualified players only) |
hitting[7] |
OBP | On-base percentage (qualified players only) |
hitting[8] |
SLG | Slugging percentage (qualified players only) |
hitting[9] |
OPS | OPS (qualified players only) |
Pitching category index reference:
| Index | Key | Category |
|---|---|---|
pitching[0] |
W | Wins (all pitchers) |
pitching[1] |
SV | Saves (all pitchers) |
pitching[2] |
HLD | Holds (all pitchers) |
pitching[3] |
IP | Innings pitched (all pitchers) |
pitching[4] |
SO | Strikeouts (all pitchers) |
pitching[5] |
AVG | Opponent batting average (qualified pitchers only) |
pitching[6] |
WHIP | WHIP (qualified pitchers only) |
pitching[7] |
ERA | ERA (qualified pitchers only) |
Qualification rules (rate stats):
plateAppearances ≥ teamGamesPlayed × 3.1inningsPitched (decimal) ≥ teamGamesPlayed × 1.0 ("73.1" = 73⅓ innings)If no player qualifies in a rate category, leaders[0].name and leaders[0].value are both "—". Counting stats always have at least one leader.
The default template uses only leaders[0]. Custom templates can use leaders[1] through leaders[4] for top-3 or top-5 paired layouts.
stats.nba.com endpoint blocks non-browser TLS fingerprints. This app uses ESPN's site.api.espn.com which is accessible from Devvit's runtime.widgetName after the first run, the app creates a new widget with the new name and stops updating the old one. The old widget is left in place — delete it manually via Reddit's sidebar editor.widgetName setting supports arbitrary strings (e.g. Eagles' "2024 Division Standings"). If you use a non-default name, confirm it matches your existing widget exactly (case-sensitive).*TemplateWikiPage settings default to blank. When blank, the app resolves the page name at runtime: sidebar-standing/default-{sport}-standings (standings), sidebar-standing/default-{sport}-schedule (schedule), or sidebar-standing/default-{sport}-stats (stats). These pages are seeded automatically on app install/upgrade — you do not need to create them. Set a pointer only when you want a custom template on a different page. The sidebar-standing/ wiki folder groups all bot-managed template pages together.enableSchedule and enableStats sections only write to config/sidebar (old Reddit). They have no effect on the new-Reddit TextArea widget.config/sidebar. The app will not append them on first run — you must place the markers manually as part of the cutover.This app makes outbound HTTP requests to the following third-party domains, each declared in the app's devvit.json permissions.http.domains allowlist. All requests are read-only GET requests to public, unauthenticated endpoints — no credentials are stored or transmitted, and no subreddit-specific identifying information is sent beyond what is needed to fetch the requested resource (e.g. league ID, season year).
| Domain | Operator | Purpose |
|---|---|---|
statsapi.mlb.com |
MLB Advanced Media (Major League Baseball) | MLB regular-season division standings, current-month schedule, and per-player team stats. Up to four requests per cron tick when the configured sport is MLB: one for standings (always), one for schedule (if enableSchedule is true), and two for per-player hitting and pitching stats (if enableStats is true). |
api-web.nhle.com |
National Hockey League | NHL division standings. Fetched once per cron tick when the configured sport is NHL. |
site.api.espn.com |
ESPN | NBA conference standings and NFL division standings. Fetched once per cron tick when the configured sport is NBA or NFL. |
This app does NOT make outbound requests to any other domain.
toddrob
CreatorApp identifier
sidebar-standing
Version
1.1.3
Last updated
Aug 20, 2026
Send feedback
Terms and conditions
Privacy policy