DraftPick
Game
- class fantraxapi.objs.Game(league: League, player: Player, game_date: str, data: dict)[source]
Represents a single Game.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Game ID.
player (Player) – Player to view this game from.
date (date) – The date this game is played.
opponent (str) – NHL Short Name of the opponent.
time (time) – Time of the game start if it hasn’t been played yet.
home (bool) – Is Player Home?
away (bool) – Is Player Away?
LivePlayer
- class fantraxapi.objs.LivePlayer(league: League, data: dict, team_id: str, points: float, points_date: date)[source]
Represents a single Player with Live Scoring.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Player ID.
name (str) – Player Name.
short_name (str) – Player Short Name.
team_name (str) – Team Name.
team_short_name (str) – Team Short Name.
pos_short_name (str) – Player Positions.
positions (list[Position]) – Player Positions.
all_positions (list[Position]) – Positions Player can be placed into.
day_to_day (bool) – Player Day-to-Day.
out (bool) – Player Out.
injured_reserve (bool) – Player on Injured Reserve.
suspended (bool) – Player Suspended.
injured (bool) – Player either Day-to-Day, Out, or on Injured Reserve.
team (Team) – Fantasy Team Player is on.
points (float) – Player Fantasy Points for the Points Date.
points_date (date) – date Player scored points.
Matchup
- class fantraxapi.objs.Matchup(scoring_period: ScoringPeriodResult, matchup_key: int, data: dict)[source]
Represents a single Matchup.
- Variables:
league (League) – The League instance this object belongs to.
scoring_period (ScoringPeriodResult) – Scoring Period result this instance belongs to.
matchup_key (int) – Team ID.
away (Team) – Away Team.
away_score (float) – Away Team Score.
home (Team) – Home Team.
home_score (float) – Home Team Score.
Player
- class fantraxapi.objs.Player(league: League, data: dict)[source]
Represents a single Player.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Player ID.
name (str) – Player Name.
short_name (str) – Player Short Name.
team_name (str) – Team Name.
team_short_name (str) – Team Short Name.
pos_short_name (str) – Player Positions.
positions (list[Position]) – Player Positions.
all_positions (list[Position]) – Positions Player can be placed into.
day_to_day (bool) – Player Day-to-Day.
out (bool) – Player Out.
injured_reserve (bool) – Player on Injured Reserve.
suspended (bool) – Player Suspended.
injured (bool) – Player either Day-to-Day, Out, or on Injured Reserve.
Position
PositionCount
- class fantraxapi.objs.PositionCount(league: League, data: dict)[source]
Represents a single Position min/max count for a period.
- Variables:
league (League) – The League instance this object belongs to.
min (int | None) – Minimum number that have to be played.
max (int | None) – Maximum number that can be played.
gp (int | None) – Total games played.
name (str) – Position Name.
short_name (str) – Position Short Name.
Record
- class fantraxapi.objs.Record(standings: Standings, team_id: str, rank: int, fields: dict, data: dict)[source]
Represents a single Record of a Standings.
- Variables:
league (League) – The League instance this object belongs to.
standings (Standings) – The Standings instance this Record belongs to.
team (Team) – Team.
rank (int) – Standings Rank.
win (int) – Number of Wins.
loss (int) – Number of Losses.
tie (int) – Number of Ties.
points (int) – Number of Points.
win_percentage (float) – Win Percentage.
games_back (int) – Number of Games Back.
wavier_wire_order (int) – Wavier Wire Claim Order.
points_for (float) – Fantasy Points For.
points_against (float) – Fantasy Points Against.
streak (str) – Streak.
Roster
- class fantraxapi.objs.Roster(league: League, team_id: str, data: dict)[source]
Represents a Player’s Roster.
- Variables:
league (League) – The League instance this object belongs to.
team (Team) – Team who made te Transaction.
period_number (int) – Daily Period Number.
period_date (date) – Daily Period Date.
active (int) – Number of Players in Active Slots.
active_max (int) – Max Number of Players that can be in Active Slots.
reserve (int) – Number of Players in Reserve Slots.
reserve_max (int) – Max Number of Players that can be in Reserve Slots.
injured (int) – Number of Players in Injured Slots.
injured_max (int) – Max Number of Players that can be in Injured Slots.
rows (list[RosterRow]) – List of RosterRows in the Roster.
RosterRow
- class fantraxapi.objs.RosterRow(roster: Roster, data: dict)[source]
Represents a single Row on a Player’s Roster.
- Variables:
league (League) – The League instance this object belongs to.
roster (Roster) – The Roster instance this RosterRow belongs to.
position (Position) – The Position object associated with the RosterRow.
player (Player | None) – The Player in the RosterRow.
total_fantasy_points (float | None) – The Total Fantasy Points for the Player in the RosterRow.
fantasy_points_per_game (float | None) – The Fantasy Points Per Game for the Player in the RosterRow.
game_today (Game) – Game for the Player in the RosterRow.
future_games (dict[str, Game]) – Dictionary of dates to future Games or the last game of the season if it’s over.
ScoringPeriod
- class fantraxapi.objs.ScoringPeriod(league: League, data: dict)[source]
Represents a single Period.
- Variables:
league (League) – The League instance this object belongs to.
start (date) – Date this scoring period starts.
end (date) – Date this scoring period ends.
number (int) – Period number.
range (str) – String display of the Scoring Period range.
ScoringPeriodResult
- class fantraxapi.objs.ScoringPeriodResult(league: League, data: dict, other_data: list[tuple[str, dict]] = None)[source]
Represents a single Scoring Period.
- Variables:
league (League) – The League instance this object belongs to.
playoffs (bool) – This Scoring Period is Playoffs.
name (str) – Name.
period (ScoringPeriod) – Scoring Period object for this result.
start (date) – Start Date of the Period.
end (date) – End Date of the Period.
next (date) – Next Day after the Period.
days (int) – Number of Days in the Scoring Period.
complete (bool) – Is the Period Complete?
current (bool) – Is it the current Period?
future (bool) – Is the Period in the future?
matchups (list[Matchup]) – List of Matchups.
other_brackets (dict[str, Matchup]) – Dictionary of Matchups in Other Brackets.
title (str) – Title of the Period.
Standings
Status
- class fantraxapi.objs.Status(league: League, data: dict)[source]
Represents a single Status.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Status ID.
code (str) – Status code.
name (str) – Status name.
short_name (str) – Status short name.
description (str) – Status description.
Team
- class fantraxapi.objs.Team(league: League, team_id: str, data: dict)[source]
Represents a single Team.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Team ID.
name (str) – Team Name.
short (str) – Team Short Name.
- position_counts(scoring_period_number: int | None = None) dict[str, PositionCount][source]
Returns a Dictionary of PositionCount objects that represents the positions used for a specific period or the latest period’s standings when scoring_period_number is None.
- Parameters:
scoring_period_number (int | None) – Period Number, defaults to None.
- Returns:
Dictionary of Position Short Names to PositionCount objects.
- Return type:
dict[str, PositionCount]
Trade
- class fantraxapi.objs.Trade(league: League, data: dict)[source]
Represents a single Trade.
- Variables:
league (League) – The League instance this object belongs to.
proposed_by (Team) – Team Trade Proposed By.
proposed (datetime) – Datetime Trade was Proposed.
accepted (datetime) – Datetime Trade was Accepted.
executed (datetime) – Datetime Trade will be Executed.
moves (list[TradeDraftPick | TradePlayer]) – List of Moves in this Trade.
TradeBlock
- class fantraxapi.objs.TradeBlock(league: League, data: dict)[source]
Represents a single Trade Block.
- Variables:
league (League) – The League instance this object belongs to.
team (Team) – Team of the Trade Block.
update_date (datetime) – Last Updated Date.
note (str) – Trading Block Note.
players_offered (dict[str, list[Player]]) – Players Offered.
positions_wanted (list[Position]) – Players Wanted.
positions_offered (list[Position]) – Positions Offered.
positions_wanted – Positions Wanted.
stats_offered (list[str]) – Stats Offered.
stats_wanted (list[str]) – Stats Wanted.
TradePlayer
- class fantraxapi.objs.TradePlayer(trade: Trade, data: dict)[source]
Represents a single Traded Player.
- Variables:
league (League) – The League instance this object belongs to.
trade (Trade) – The Trade instance this TradePlayer belongs to.
from_team (Team) – Fantasy Team Traded From.
to_team (Team) – Fantasy Team Traded To.
player (Player) – The Player instance this TradePlayer belongs to.
fantasy_points_per_game (float) – Fantasy Points Per Game.
total_fantasy_points (float) – Total Fantasy Points.
Transaction
- class fantraxapi.objs.Transaction(league: League, data: list[dict])[source]
Represents a single Transaction.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Transaction ID.
team (Team) – Team who made the Transaction.
date (datetime) – Transaction Date.
players (list[TransactionPlayer]) – Players in the Transaction.
TransactionPlayer
- class fantraxapi.objs.TransactionPlayer(league: League, data: dict, transaction_type: str)[source]
Represents a single Player from a Transaction.
- Variables:
league (League) – The League instance this object belongs to.
id (str) – Player ID.
name (str) – Player Name.
short_name (str) – Player Short Name.
team_name (str) – Team Name.
team_short_name (str) – Team Short Name.
pos_short_name (str) – Player Positions.
positions (list[Position]) – Player Positions.
all_positions (list[Position]) – Positions Player can be placed into.
day_to_day (bool) – Player Day-to-Day.
out (bool) – Player Out.
injured_reserve (bool) – Player on Injured Reserve.
suspended (bool) – Player Suspended.
injured (bool) – Player either Day-to-Day, Out, or on Injured Reserve.
type (str) – Transaction Type.