slickbet.screenerΒΆ

Betting screener for finding and ranking soccer betting opportunities.

Fetches upcoming fixtures via LivescoreClient, filters by league/country, enriches matches with stats, runs BettingModel, and ranks predictions. Also provides display helpers format_prediction and format_summary.

AttributesΒΆ

ClassesΒΆ

BettingScreener

Main screener class for finding betting opportunities.

ScreenerConfig

Configuration for the betting screener.

ScreenerResult

Result of running the betting screener.

FunctionsΒΆ

format_prediction(β†’ str)

Format a prediction for display.

format_summary(β†’ str)

Format a summary of screener results.

get_best_double_chance_prob(β†’ float)

Get the best double chance probability from a prediction.

to_central_time(β†’ datetime.datetime)

Convert a datetime to Central Time (CST/CDT).

Module ContentsΒΆ

slickbet.screener.ALL_LEAGUE_IDSΒΆ
slickbet.screener.AMERICAS_LEAGUE_IDSΒΆ
slickbet.screener.AMERICAS_LEAGUE_NAMES = ['liga professional', 'argentina', 'serie a', 'brazil', 'liga mx', 'mexico']ΒΆ
slickbet.screener.ASIA_LEAGUE_IDSΒΆ
slickbet.screener.ASIA_LEAGUE_NAMES = ['saudi', 'pro league', 'hyundai a-league', 'a-league', 'australia', 'j. league', 'j league', 'japan']ΒΆ
class slickbet.screener.BettingScreener(config: ScreenerConfig | None = None, api_client: slickbet.api.LivescoreClient | None = None, model: slickbet.model.BettingModel | None = None)[source]ΒΆ

Main screener class for finding betting opportunities.

Examples

>>> screener = BettingScreener()
>>> result = screener.screen_tomorrow()
>>> for bet in result.get_top_k(10):
...     print(bet)
clientΒΆ
configΒΆ
modelΒΆ
screen_date(date: datetime.datetime) ScreenerResult[source]ΒΆ

Screen matches for a specific date.

Parameters:

date (datetime) – The date to screen

Returns:

ScreenerResult – ScreenerResult with ranked predictions

screen_days(days: int = 7) ScreenerResult[source]ΒΆ

Screen matches for the next N calendar days (not 24-hour windows).

Uses calendar-day logic so results are invariant of run time; each day includes all games that kick off that day in Central time.

Parameters:

days (int, optional) – Number of calendar days to screen (default: 7)

Returns:

ScreenerResult – ScreenerResult with ranked predictions from all days

screen_tomorrow() ScreenerResult[source]ΒΆ

Screen tomorrow’s matches (next calendar day, all fixtures that day).

Uses calendar-day logic so results are invariant of run time: e.g. running at 8am or 11pm both get the same β€œtomorrow” fixtures.

Returns:

ScreenerResult – Ranked predictions for tomorrow’s fixtures.

slickbet.screener.CUP_COMPETITION_IDSΒΆ
slickbet.screener.CUP_NAME_PATTERNS = ['cup', 'copa', 'coupe', 'coppa', 'pokal', 'super cup', 'supercup', 'community shield', 'charity...ΒΆ
slickbet.screener.MAJOR_LEAGUE_IDSΒΆ
slickbet.screener.MAJOR_LEAGUE_NAMES = ['bundesliga', 'premier league', 'la liga', 'laliga', 'serie a', 'ligue 1']ΒΆ
slickbet.screener.MINOR_LEAGUE_IDSΒΆ
slickbet.screener.MINOR_LEAGUE_NAMES = ['belgian pro league', 'pro league', 'primeira liga', 'portugal', 'super lig', 'turkey',...ΒΆ
class slickbet.screener.ScreenerConfig[source]ΒΆ

Configuration for the betting screener.

min_probabilityΒΆ

Minimum win probability for a bet to be kept (default 0.55).

Type:

float

min_confidenceΒΆ

Minimum model confidence threshold (default 0.10).

Type:

float

fetch_detailed_statsΒΆ

If True, enrich matches with form/standings/H2H/performance.

Type:

bool

max_workersΒΆ

Concurrent API workers for enrichment.

Type:

int

countriesΒΆ

Country name filters (empty = all).

Type:

list[str]

competitionsΒΆ

Competition name filters (empty = all).

Type:

list[str]

competition_idsΒΆ

Competition ID filters (empty = all).

Type:

list[str]

major_leagues_onlyΒΆ

Restrict to top-5 European leagues.

Type:

bool

asia_leagues_onlyΒΆ

Restrict to configured Asia leagues.

Type:

bool

americas_leagues_onlyΒΆ

Restrict to configured Americas leagues.

Type:

bool

all_leaguesΒΆ

Include major + minor European + Asia + Americas.

Type:

bool

__post_init__() None[source]ΒΆ

Normalize None list fields to empty lists.

all_leagues: bool = FalseΒΆ
americas_leagues_only: bool = FalseΒΆ
asia_leagues_only: bool = FalseΒΆ
competition_ids: list[str] | None = NoneΒΆ
competitions: list[str] | None = NoneΒΆ
countries: list[str] | None = NoneΒΆ
fetch_detailed_stats: bool = TrueΒΆ
major_leagues_only: bool = FalseΒΆ
max_workers: int = 5ΒΆ
min_confidence: float = 0.1ΒΆ
min_probability: float = 0.55ΒΆ
class slickbet.screener.ScreenerResult[source]ΒΆ

Result of running the betting screener.

get_away_wins() list[slickbet.model.BetPrediction][source]ΒΆ

Get all predictions recommending away win.

get_home_wins() list[slickbet.model.BetPrediction][source]ΒΆ

Get all predictions recommending home win.

get_top_k(k: int) list[slickbet.model.BetPrediction][source]ΒΆ

Get top K betting opportunities by double chance.

Parameters:

k (int) – Number of predictions to return.

Returns:

list[BetPrediction] – Top k predictions sorted by best double-chance probability.

matches_filtered: intΒΆ
predictions: list[slickbet.model.BetPrediction]ΒΆ
timestamp: datetime.datetimeΒΆ
property top_bets: list[slickbet.model.BetPrediction]ΒΆ

Get predictions sorted by best double chance probability (highest first).

property top_bets_by_win: list[slickbet.model.BetPrediction]ΒΆ

Get predictions sorted by win probability (highest first).

total_matches_scanned: intΒΆ
slickbet.screener.format_prediction(prediction: slickbet.model.BetPrediction, rank: int = 0) str[source]ΒΆ

Format a prediction for display.

Parameters:
  • prediction (BetPrediction) – The prediction to format

  • rank (int, optional) – Optional rank number to display

Returns:

str – Formatted string representation

slickbet.screener.format_summary(result: ScreenerResult) str[source]ΒΆ

Format a summary of screener results.

Parameters:

result (ScreenerResult) – The screener result to summarize

Returns:

str – Formatted summary string

slickbet.screener.get_best_double_chance_prob(prediction: slickbet.model.BetPrediction) float[source]ΒΆ

Get the best double chance probability from a prediction.

Parameters:

prediction (BetPrediction) – Model prediction (may include double_chance).

Returns:

float – Best double-chance probability, or win probability as fallback.

slickbet.screener.to_central_time(dt: datetime.datetime) datetime.datetime[source]ΒΆ

Convert a datetime to Central Time (CST/CDT).

Parameters:

dt (datetime) – Datetime object (assumed to be naive/UTC)

Returns:

datetime – Datetime object in Central Time