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ΒΆ
Main screener class for finding betting opportunities. |
|
Configuration for the betting screener. |
|
Result of running the betting screener. |
FunctionsΒΆ
|
Format a prediction for display. |
|
Format a summary of screener results. |
|
Get the best double chance probability from a prediction. |
|
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.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
kpredictions sorted by best double-chance probability.
- 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).
- 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