Team Completed Matches
Fetch completed match history for a team with scores, opponent info, win/loss status, and event context.
team.completed_matches(team_id) returns the completed match history for a team on vlr.gg.
By default it returns the first 50 matches (vlr.gg's first page). Set limit to
fetch more, or return_all=True to fetch every page.
Signature
team.completed_matches(
team_id: int,
limit: int = 50,
return_all: bool = False,
) -> TeamCompletedMatchesParameters
Prop
Type
Returns - TeamCompletedMatches
Prop
Type
TeamCompletedMatchEntry Fields
Prop
Type
OpponentInCompletedMatch Fields
Prop
Type
Examples
Recent results
Print the team's most recent completed matches with scores.
import vlrdevapi
history = vlrdevapi.team.completed_matches(team_id=2593)
print(f"Completed matches for team {history.team_id}:")
for m in history.matches[:10]:
result = "WON" if m.is_win else "lost"
opp = m.opponent.name if m.opponent else "TBD"
round_label = " ".join(part for part in (m.stage, m.bracket) if part)
print(
f" {m.team_score} - {m.opponent_score} vs {opp} "
f"({result}) - {m.event} {round_label}"
)Win/loss record
Calculate and display the team's overall win/loss record.
import vlrdevapi
history = vlrdevapi.team.completed_matches(team_id=2593)
wins = sum(1 for m in history.matches if m.is_win)
losses = sum(1 for m in history.matches if not m.is_win)
total = wins + losses
pct = wins / total * 100 if total else 0
print(f"{wins}W - {losses}L ({pct:.0f}% win rate) over {total} matches")Older history
limit fetches as many pages as needed, rounded to vlr.gg's 50-match page size:
import vlrdevapi
history = vlrdevapi.team.completed_matches(team_id=2593, limit=80)
print(len(history.matches)) # 80
print(history.has_next_page) # True if more than 80 existUse return_all=True to fetch every page:
import vlrdevapi
history = vlrdevapi.team.completed_matches(team_id=2593, return_all=True)
print(len(history.matches)) # all completed matchesCurried access
Access completed matches using the curried team() shorthand.
import vlrdevapi
team = vlrdevapi.team(2593)
history = team.completed_matches()
for m in history.matches[:5]:
tag = m.opponent.tag if m.opponent else "TBD"
print(f"{'W' if m.is_win else 'L'} {m.team_score}-{m.opponent_score} vs {tag}")Last updated on