Skip to main content
Version: main

ODDS — additional Python functions

Hand-written wrappers, loaders, and helpers in sportsdataverse.odds not covered by the generated API-endpoint reference above.

Other

toa_event_markets(sport: 'str', event_id: 'str', regions: 'str' = 'us', bookmakers: 'Optional[str]' = None, date_format: 'Optional[str]' = 'iso', api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, Dict]'

Markets available for a single event

(/v4/sports/{sport}/events/{eventId}/markets). Quota: free.

Parameters

ParameterTypeDefaultDescription
sportstrSport key from toa_sports.
event_idstrEvent id from toa_sports_events.
regionsstr'us'Comma-separated bookmaker regions.
bookmakersOptional[str]NoneComma-separated bookmaker keys (takes precedence over regions).
date_formatOptional[str]'iso'"iso" or "unix".
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame (one row per bookmaker x available market) by default; raw JSON dict when return_parsed=False.

Example

from sportsdataverse.odds import toa_sports_events, toa_event_markets
eid = toa_sports_events(sport="americanfootball_nfl", return_parsed=False)[0]["id"]
toa_event_markets(sport="americanfootball_nfl", event_id=eid).head()

toa_event_odds(sport: 'str', event_id: 'str', regions: 'str' = 'us', markets: 'Optional[str]' = 'h2h', odds_format: 'Optional[str]' = 'american', date_format: 'Optional[str]' = 'iso', bookmakers: 'Optional[str]' = None, include_links: 'Optional[bool]' = None, include_sids: 'Optional[bool]' = None, include_bet_limits: 'Optional[bool]' = None, include_multipliers: 'Optional[bool]' = None, include_rotation_numbers: 'Optional[bool]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, Dict]'

Odds for a single event, incl. player-prop markets

(/v4/sports/{sport}/events/{eventId}/odds).

Parameters

ParameterTypeDefaultDescription
sportstrSport key from toa_sports.
event_idstrEvent id from toa_sports_events.
regionsstr'us'Comma-separated bookmaker regions.
marketsOptional[str]'h2h'Comma-separated markets (event-level markets include player props).
odds_formatOptional[str]'american'"american" or "decimal".
date_formatOptional[str]'iso'"iso" or "unix".
bookmakersOptional[str]NoneComma-separated bookmaker keys (takes precedence over regions).
include_linksOptional[bool]NoneInclude deep links.
include_sidsOptional[bool]NoneInclude bookmaker source ids.
include_bet_limitsOptional[bool]NoneInclude bet limits where available.
include_multipliersOptional[bool]NoneInclude SGP multipliers where available.
include_rotation_numbersOptional[bool]NoneInclude rotation numbers where available.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A long-form polars/pandas DataFrame (one row per bookmaker x market x outcome) by default; raw JSON dict when return_parsed=False.

Example

from sportsdataverse.odds import toa_sports_events, toa_event_odds
eid = toa_sports_events(sport="americanfootball_nfl", return_parsed=False)[0]["id"]
toa_event_odds(sport="americanfootball_nfl", event_id=eid, markets="player_pass_tds").head()

toa_event_odds_history(sport: 'str', event_id: 'str', date: 'str' = '2023-11-29T22:45:00Z', regions: 'str' = 'us', markets: 'Optional[str]' = 'h2h', odds_format: 'Optional[str]' = 'american', date_format: 'Optional[str]' = 'iso', bookmakers: 'Optional[str]' = None, include_rotation_numbers: 'Optional[bool]' = None, include_multipliers: 'Optional[bool]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, Dict]'

Historical odds snapshot for a single event

(/v4/historical/sports/{sport}/events/{eventId}/odds). Paid plans only.

Parameters

ParameterTypeDefaultDescription
sportstrSport key from toa_sports.
event_idstrEvent id from toa_sports_events_history.
datestr'2023-11-29T22:45:00Z'ISO8601 timestamp of the snapshot to fetch.
regionsstr'us'Comma-separated bookmaker regions.
marketsOptional[str]'h2h'Comma-separated markets (event-level markets include player props).
odds_formatOptional[str]'american'"american" or "decimal".
date_formatOptional[str]'iso'"iso" or "unix".
bookmakersOptional[str]NoneComma-separated bookmaker keys.
include_rotation_numbersOptional[bool]NoneInclude rotation numbers where available.
include_multipliersOptional[bool]NoneInclude SGP multipliers where available.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A long-form polars/pandas DataFrame (one row per bookmaker x market x outcome, stamped with the snapshot timestamps) by default; the raw JSON snapshot dict when return_parsed=False.

Example

from sportsdataverse.odds import toa_event_odds_history
toa_event_odds_history(sport="americanfootball_nfl", event_id="...",
date="2023-11-29T22:45:00Z").head()

toa_sports(all_sports: 'Optional[bool]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, List]'

List the sports/leagues available from The Odds API (/v4/sports). Quota: free.

Parameters

ParameterTypeDefaultDescription
all_sportsOptional[bool]NoneWhen True, include out-of-season sports too (default returns only in-season). Sent as the all query flag.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame (one row per sport) by default; the raw JSON list when return_parsed=False.

col_nametypedescription
keycharacterThe Odds API sport key, a lowercase slug such as 'americanfootball_ncaaf' or 'aussierules_afl', with futures keys ending in a suffix like 'championship_winner'; pass it as sport= to the other toa* functions.
groupcharacterStat group (e.g. "hitting", "pitching", "fielding").
titlecharacterSpecific role title for the assignment.
descriptioncharacterLong-form description text.
activelogicalTRUE if the row represents an active record (player / team / season).
has_outrightslogicalTrue for futures keys such as 'americanfootball_ncaaf_championship_winner' or 'americanfootball_nfl_super_bowl_winner', False for game leagues such as 'americanfootball_ncaaf'.

Example

from sportsdataverse.odds import toa_sports
toa_sports(all_sports=True).head()

toa_sports_events(sport: 'str' = 'americanfootball_nfl', date_format: 'Optional[str]' = 'iso', event_ids: 'Optional[str]' = None, commence_time_from: 'Optional[str]' = None, commence_time_to: 'Optional[str]' = None, include_rotation_numbers: 'Optional[bool]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, List]'

Upcoming + live events for a sport (/v4/sports/{sport}/events). Quota: free.

Parameters

ParameterTypeDefaultDescription
sportstr'americanfootball_nfl'Sport key from toa_sports.
date_formatOptional[str]'iso'"iso" or "unix".
event_idsOptional[str]NoneOptional comma-separated event ids to filter to.
commence_time_fromOptional[str]NoneISO8601 lower bound on event commence time.
commence_time_toOptional[str]NoneISO8601 upper bound on event commence time.
include_rotation_numbersOptional[bool]NoneInclude rotation numbers where available.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame (one row per event) by default; raw JSON list when return_parsed=False.

col_nametypedescription
idcharacterID of the player in the 'name' column.
sport_keycharacterThe Odds API sport key the event belongs to, the same slug toa_sports returns as key (sampled 'americanfootball_nfl', the function's default sport).
sport_titlecharacterDisplay title of the sport key, e.g. 'NFL' for americanfootball_nfl.
commence_timecharacterScheduled start of the event from The Odds API, an ISO-8601 UTC string with a trailing Z, kept as text.
home_teamcharacterHome team name.
away_teamcharacterAway team name.

Example

from sportsdataverse.odds import toa_sports_events
toa_sports_events(sport="americanfootball_nfl").head()

toa_sports_events_history(sport: 'str' = 'americanfootball_nfl', date: 'str' = '2023-11-29T22:45:00Z', date_format: 'Optional[str]' = 'iso', event_ids: 'Optional[str]' = None, commence_time_from: 'Optional[str]' = None, commence_time_to: 'Optional[str]' = None, include_rotation_numbers: 'Optional[bool]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, Dict]'

Historical events snapshot for a sport

(/v4/historical/sports/{sport}/events). Paid plans only.

Parameters

ParameterTypeDefaultDescription
sportstr'americanfootball_nfl'Sport key from toa_sports.
datestr'2023-11-29T22:45:00Z'ISO8601 timestamp of the snapshot to fetch.
date_formatOptional[str]'iso'"iso" or "unix".
event_idsOptional[str]NoneOptional comma-separated event ids to filter to.
commence_time_fromOptional[str]NoneISO8601 lower bound on event commence time.
commence_time_toOptional[str]NoneISO8601 upper bound on event commence time.
include_rotation_numbersOptional[bool]NoneInclude rotation numbers where available.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame (one row per event, stamped with the snapshot timestamps) by default; the raw JSON snapshot dict when return_parsed=False.

col_nametypedescription
snapshot_timestampcharacterTime of the historical snapshot the API returned, an ISO-8601 UTC string with a trailing Z; the same on every row of a call (sampled '2023-11-29T22:40:39Z' for the default date '2023-11-29T22:45:00Z').
previous_timestampcharacterTime of the snapshot immediately before the returned one, an ISO-8601 UTC string with a trailing Z; the same on every row of a call (sampled '2023-11-29T22:35:39Z').
next_timestampcharacterTime of the snapshot immediately after the returned one, an ISO-8601 UTC string with a trailing Z; the same on every row of a call (sampled '2023-11-29T22:45:40Z').
idcharacterID of the player in the 'name' column.
sport_keycharacterThe Odds API sport key the event belongs to, the same slug toa_sports returns as key (sampled 'americanfootball_nfl', the function's default sport).
sport_titlecharacterDisplay title of the sport key, e.g. 'NFL' for americanfootball_nfl.
commence_timecharacterScheduled start of the event from The Odds API, an ISO-8601 UTC string with a trailing Z, kept as text.
home_teamcharacterHome team name.
away_teamcharacterAway team name.

Example

from sportsdataverse.odds import toa_sports_events_history
toa_sports_events_history(sport="americanfootball_nfl", date="2023-11-29T22:45:00Z").head()

toa_sports_odds(sport: 'str' = 'americanfootball_nfl', regions: 'str' = 'us', markets: 'Optional[str]' = 'h2h', odds_format: 'Optional[str]' = 'american', date_format: 'Optional[str]' = 'iso', event_ids: 'Optional[str]' = None, bookmakers: 'Optional[str]' = None, commence_time_from: 'Optional[str]' = None, commence_time_to: 'Optional[str]' = None, include_links: 'Optional[bool]' = None, include_sids: 'Optional[bool]' = None, include_bet_limits: 'Optional[bool]' = None, include_rotation_numbers: 'Optional[bool]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, List]'

Current odds for a sport (/v4/sports/{sport}/odds), one row per outcome.

Parameters

ParameterTypeDefaultDescription
sportstr'americanfootball_nfl'Sport key from toa_sports (e.g. "americanfootball_nfl").
regionsstr'us'Comma-separated bookmaker regions (us/us2/uk/eu/au).
marketsOptional[str]'h2h'Comma-separated markets (h2h, spreads, totals, outrights, ...).
odds_formatOptional[str]'american'"american" or "decimal".
date_formatOptional[str]'iso'"iso" or "unix".
event_idsOptional[str]NoneOptional comma-separated event ids to filter to.
bookmakersOptional[str]NoneComma-separated bookmaker keys (takes precedence over regions).
commence_time_fromOptional[str]NoneISO8601 lower bound on event commence time.
commence_time_toOptional[str]NoneISO8601 upper bound on event commence time.
include_linksOptional[bool]NoneInclude bookmaker/market/outcome deep links.
include_sidsOptional[bool]NoneInclude bookmaker-specific source ids.
include_bet_limitsOptional[bool]NoneInclude bet limits where exchanges expose them.
include_rotation_numbersOptional[bool]NoneInclude rotation numbers where available.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A long-form polars/pandas DataFrame (one row per event x bookmaker x market x outcome) by default; raw JSON list when return_parsed=False.

col_nametypedescription
event_idcharacterUnique event / game identifier (ESPN).
sport_keycharacterThe Odds API sport key the event belongs to, the same slug toa_sports returns as key (sampled 'americanfootball_nfl', the function's default sport).
sport_titlecharacterDisplay title of the sport key, e.g. 'NFL' for americanfootball_nfl.
commence_timecharacterScheduled start of the event from The Odds API, an ISO-8601 UTC string with a trailing Z, kept as text.
home_teamcharacterHome team name.
away_teamcharacterAway team name.
bookmaker_keycharacterThe Odds API bookmaker key, a lowercase slug such as 'draftkings', 'fanduel' or 'williamhill_us'.
bookmaker_titlecharacterBookmaker display name, e.g. 'DraftKings', 'BetOnline.ag', or 'Caesars' for williamhill_us.
bookmaker_last_updatecharacterWhen this bookmaker last updated its odds for the event, an ISO-8601 UTC string with a trailing Z.
market_keycharacterBetting market of the outcome row; only 'h2h' (moneyline) appears in the sampled data, which used the default markets='h2h'.
market_last_updatecharacterWhen the bookmaker last updated this market for the event, an ISO-8601 UTC string with a trailing Z.
outcome_namecharacterOutcome the price applies to; on the sampled h2h rows, a team's full name (e.g. 'Buffalo Bills').
outcome_descriptioncharacterCopied from the outcome's description field; all null in the sampled data, which held only h2h outcomes.
outcome_priceintegerPrice of the outcome as an integer in American odds under the default odds_format='american' (e.g. -238, 195).
outcome_pointcharacterCopied from the outcome's point field, stored as text; all null in the sampled data, which held only h2h (moneyline) outcomes.
outcome_linkcharacterOutcome deep link, only sent when include_links=True; all null in the sampled data, which did not request links.
outcome_sidcharacterBookmaker-specific source id for the outcome, only sent when include_sids=True; all null in the sampled data, which did not request sids.

Example

from sportsdataverse.odds import toa_sports_odds
toa_sports_odds(sport="americanfootball_nfl", regions="us", markets="h2h,spreads").head()

toa_sports_odds_history(sport: 'str' = 'americanfootball_nfl', date: 'str' = '2023-11-29T22:45:00Z', regions: 'str' = 'us', markets: 'Optional[str]' = 'h2h', odds_format: 'Optional[str]' = 'american', date_format: 'Optional[str]' = 'iso', event_ids: 'Optional[str]' = None, bookmakers: 'Optional[str]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, Dict]'

Historical odds snapshot for a sport

(/v4/historical/sports/{sport}/odds). Paid plans only.

Parameters

ParameterTypeDefaultDescription
sportstr'americanfootball_nfl'Sport key from toa_sports.
datestr'2023-11-29T22:45:00Z'ISO8601 timestamp of the snapshot to fetch (the API returns the nearest snapshot at or before this time).
regionsstr'us'Comma-separated bookmaker regions.
marketsOptional[str]'h2h'Comma-separated markets.
odds_formatOptional[str]'american'"american" or "decimal".
date_formatOptional[str]'iso'"iso" or "unix".
event_idsOptional[str]NoneOptional comma-separated event ids to filter to.
bookmakersOptional[str]NoneComma-separated bookmaker keys.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A long-form polars/pandas DataFrame (one row per outcome, stamped with the snapshot timestamps) by default; the raw JSON snapshot dict when return_parsed=False.

col_nametypedescription
snapshot_timestampcharacterTime of the historical snapshot the API returned, an ISO-8601 UTC string with a trailing Z; the same on every row of a call (sampled '2023-11-29T22:40:39Z' for the default date '2023-11-29T22:45:00Z').
previous_timestampcharacterTime of the snapshot immediately before the returned one, an ISO-8601 UTC string with a trailing Z; the same on every row of a call (sampled '2023-11-29T22:35:39Z').
next_timestampcharacterTime of the snapshot immediately after the returned one, an ISO-8601 UTC string with a trailing Z; the same on every row of a call (sampled '2023-11-29T22:45:40Z').
event_idcharacterUnique event / game identifier (ESPN).
sport_keycharacterThe Odds API sport key the event belongs to, the same slug toa_sports returns as key (sampled 'americanfootball_nfl', the function's default sport).
sport_titlecharacterDisplay title of the sport key, e.g. 'NFL' for americanfootball_nfl.
commence_timecharacterScheduled start of the event from The Odds API, an ISO-8601 UTC string with a trailing Z, kept as text.
home_teamcharacterHome team name.
away_teamcharacterAway team name.
bookmaker_keycharacterThe Odds API bookmaker key, a lowercase slug such as 'draftkings', 'fanduel' or 'williamhill_us'.
bookmaker_titlecharacterBookmaker display name, e.g. 'DraftKings', 'BetOnline.ag', or 'Caesars' for williamhill_us.
bookmaker_last_updatecharacterWhen this bookmaker last updated its odds for the event, an ISO-8601 UTC string with a trailing Z.
market_keycharacterBetting market of the outcome row; only 'h2h' (moneyline) appears in the sampled data, which used the default markets='h2h'.
market_last_updatecharacterWhen the bookmaker last updated this market for the event, an ISO-8601 UTC string with a trailing Z.
outcome_namecharacterOutcome the price applies to; on the sampled h2h rows, a team's full name (e.g. 'Buffalo Bills').
outcome_descriptioncharacterCopied from the outcome's description field; all null in the sampled data, which held only h2h outcomes.
outcome_priceintegerPrice of the outcome as an integer in American odds under the default odds_format='american' (e.g. -238, 195).
outcome_pointcharacterCopied from the outcome's point field, stored as text; all null in the sampled data, which held only h2h (moneyline) outcomes.
outcome_linkcharacterOutcome deep link, only sent when include_links=True; all null in the sampled data, which did not request links.
outcome_sidcharacterBookmaker-specific source id for the outcome, only sent when include_sids=True; all null in the sampled data, which did not request sids.

Example

from sportsdataverse.odds import toa_sports_odds_history
toa_sports_odds_history(sport="americanfootball_nfl", date="2023-11-29T22:45:00Z").head()

toa_sports_participants(sport: 'str' = 'americanfootball_nfl', api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, List]'

Teams / participants for a sport (/v4/sports/{sport}/participants). Quota: free.

Parameters

ParameterTypeDefaultDescription
sportstr'americanfootball_nfl'Sport key from toa_sports.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame (one row per participant) by default; raw JSON list when return_parsed=False.

col_nametypedescription
full_namecharacterPlayer's full name.
idcharacterID of the player in the 'name' column.

Example

from sportsdataverse.odds import toa_sports_participants
toa_sports_participants(sport="americanfootball_nfl").head()

toa_sports_scores(sport: 'str' = 'americanfootball_nfl', days_from: 'Optional[int]' = None, date_format: 'Optional[str]' = 'iso', event_ids: 'Optional[str]' = None, api_key: 'Optional[str]' = None, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs) -> 'Union[DataFrameT, List]'

Live + recently-completed scores for a sport (/v4/sports/{sport}/scores).

Parameters

ParameterTypeDefaultDescription
sportstr'americanfootball_nfl'Sport key from toa_sports.
days_fromOptional[int]NoneInclude completed games from this many days ago (1-3). Omit for live + upcoming only.
date_formatOptional[str]'iso'"iso" or "unix".
event_idsOptional[str]NoneOptional comma-separated event ids to filter to.
api_keyOptional[str]NoneThe Odds API key (else ODDS_API_KEY env).
return_parsedboolTrueParse to a tidy DataFrame (default). False returns raw JSON.
return_as_pandasboolFalseWith return_parsed, return pandas instead of polars.

Returns

A polars/pandas DataFrame (one row per event) by default; raw JSON list when return_parsed=False.

col_nametypedescription
idcharacterID of the player in the 'name' column.
sport_keycharacterThe Odds API sport key the event belongs to, the same slug toa_sports returns as key (sampled 'americanfootball_nfl', the function's default sport).
sport_titlecharacterDisplay title of the sport key, e.g. 'NFL' for americanfootball_nfl.
commence_timecharacterScheduled start of the event from The Odds API, an ISO-8601 UTC string with a trailing Z, kept as text.
completedlogicalTRUE if the game is complete.
home_teamcharacterHome team name.
away_teamcharacterAway team name.
scorescharacterEvent scores as the parser's str() rendering of the API's list value (Python repr, not JSON); null on all 32 sampled events, none of which had started.
last_updatecharacterTime of the event's last score update; null on all 32 sampled events, none of which had started when the data was pulled.

Example

from sportsdataverse.odds import toa_sports_scores
toa_sports_scores(sport="americanfootball_nfl", days_from=3).head()

toa_usage(return_as_pandas: 'bool' = False) -> 'DataFrameT'

Return the cached API-key quota from the most recent call (no network/quota cost).

Reads the x-requests-remaining / x-requests-used headers captured on the last sportsdataverse.odds call; all values are None until a request has been made in this session.

Parameters

ParameterTypeDefaultDescription
return_as_pandasboolFalseReturn a pandas.DataFrame instead of polars.

Returns

A one-row polars (or pandas) DataFrame with requests_remaining, requests_used and last_cost (credits the last call consumed).

col_nametypedescription
requests_remainingintegerRequests left on the API key, from the x-requests-remaining header of the most recent call in this Python session; null until a call has been made.
requests_usedintegerRequests the API key has used, from the x-requests-used header of the most recent call in this Python session; null until a call has been made.
last_costintegerQuota credits the most recent The Odds API call in this Python session used, from its x-requests-last header; 0 in the sample. Null until a call has been made.

Example

from sportsdataverse.odds import toa_sports, toa_usage
_ = toa_sports()
toa_usage()