Skip to main content

Real-time betting odds monitoring with line movements and cross-sportsbook comparison

Project description

betting-odds-tracker

Track where the smart money is going.

A real-time odds monitoring tool that tracks line movements across sportsbooks, identifies sharp money signals, and helps you find the best available odds for NBA, MLB, and Soccer.

The Problem

Odds are scattered across dozens of sportsbooks. Lines move fast. By the time you manually compare FanDuel, DraftKings, and BetMGM, the value is gone. And you have no idea whether that line move was driven by public money or sharps.

The Solution

betting-odds-tracker pulls odds from multiple sportsbooks through The Odds API, tracks every movement over time, and alerts you to sharp money signals -- all correlated with live game scores so you have full context.

What You Get

  • Cross-book comparison: See moneyline, spread, and totals from every major sportsbook side by side
  • Line movement tracking: Opening vs current line with timestamped snapshots
  • Sharp money detection: Reverse line movement flags (when lines move against public betting percentages)
  • Best available odds: Instantly see which book has the best price
  • Live game context: Current scores pulled alongside odds for in-game correlation

Who This Is For

  • Sports bettors who want to find the best line before placing a wager
  • Sharp bettors who track line movement as an information signal
  • Casual bettors who want to stop leaving money on the table by always betting at the worst number
  • Analysts studying market efficiency in sports betting

Setup

1. The Odds API Key (Required)

The odds data comes from The Odds API. The free tier provides 500 API requests per month, which is plenty for daily tracking.

  1. Register at the-odds-api.com
  2. Copy your API key from the dashboard
  3. Set the environment variable:
export ODDS_API_KEY="your-odds-api-key-here"

2. Data API Key for Live Scores (Required)

For live game score context:

export SHIPP_API_KEY="your-api-key-here"

Get one at platform.shipp.ai.

3. Install Dependencies

pip install requests

Usage

Quick Odds Check

from scripts.odds_tracker import OddsTracker

tracker = OddsTracker()

# Get current NBA odds
nba_odds = tracker.get_odds("nba")
print(nba_odds.table())

Track Line Movement

# Take a snapshot (run this periodically, e.g., every hour)
tracker.snapshot("nba")

# View movement since opening
movements = tracker.get_line_movement("nba")
for game in movements:
    print(f"{game['away']} @ {game['home']}")
    print(f"  Spread: opened {game['open_spread']} -> now {game['current_spread']}")
    print(f"  Total:  opened {game['open_total']} -> now {game['current_total']}")
    if game.get("reverse_movement"):
        print("  ** REVERSE LINE MOVEMENT DETECTED **")

Find Best Odds

best = tracker.best_odds("nba", market="h2h")
for game in best:
    print(f"{game['away']} @ {game['home']}")
    print(f"  Best {game['away']}: {game['best_away_odds']} at {game['best_away_book']}")
    print(f"  Best {game['home']}: {game['best_home_odds']} at {game['best_home_book']}")

Sharp Money Alerts

alerts = tracker.sharp_money_alerts("nba")
for alert in alerts:
    print(f"ALERT: {alert['game']} -- {alert['signal']}")
    print(f"  Line moved from {alert['open']} to {alert['current']}")
    print(f"  Direction: {alert['direction']}")

All Sports Dashboard

dashboard = tracker.dashboard()
print(dashboard)

Output Format

Odds Table

=== NBA ODDS — February 18, 2026 ===

Lakers @ Warriors — 7:30 PM ET
                  Moneyline         Spread           Total
                  LAL    GSW       LAL    GSW       O/U
  FanDuel        +145   -170      +4.0   -4.0      225.5
  DraftKings     +150   -175      +4.0   -4.0      226.0
  BetMGM         +140   -165      +3.5   -3.5      225.5
  Caesars        +145   -170      +4.0   -4.0      225.0
  -----------------------------------------------------------------
  Best Odds      +150   -165      +4.0   -3.5      226.0/225.0
  Consensus      +145   -170      +4.0   -4.0      225.5
  Opening        +130   -155      +3.0   -3.0      223.5
  Movement         +15    -15      +1.0   -1.0       +2.0

Movement Alert

{
  "game": "Lakers @ Warriors",
  "market": "spread",
  "signal": "reverse_line_movement",
  "open": -3.0,
  "current": -4.0,
  "direction": "Warriors favored more despite public on Lakers",
  "timestamp": "2026-02-18T18:30:00Z",
  "confidence": "medium"
}

API Usage & Rate Limits

The free tier of The Odds API allows 500 requests per month. The tracker is designed to be efficient with your quota:

Action API Calls Recommended Frequency
All NBA odds (3 markets) 1 Every 2-4 hours
All MLB odds (3 markets) 1 Every 2-4 hours
All Soccer odds (1 league) 1 Every 2-4 hours
Score settlement check 1 After games end

With 3 sports checked 4x/day, you use roughly 360 requests/month, leaving headroom for ad-hoc checks.

The tracker also caches responses locally (15-minute TTL) to avoid duplicate API calls within short windows.

Architecture

odds_tracker.py         Main orchestrator + reporting
    |
    +---> odds_api.py       The Odds API integration + caching
    |
    +---> shipp_wrapper.py  Live score context
    |
    +---> snapshots/        Local line movement history (JSON)

Supported Sportsbooks

The Odds API returns odds from many US-licensed sportsbooks. Common ones:

  • FanDuel
  • DraftKings
  • BetMGM
  • Caesars (William Hill)
  • PointsBet
  • Barstool / ESPN BET
  • BetRivers
  • Unibet

Availability varies by sport and region.

License

MIT


Powered by Shipp.ai real-time data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

betting_odds_tracker-0.1.0.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

betting_odds_tracker-0.1.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file betting_odds_tracker-0.1.0.tar.gz.

File metadata

  • Download URL: betting_odds_tracker-0.1.0.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for betting_odds_tracker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5af0aec07af98d77c132f45dc9c097647cfb1cc6b1037b8263c0e4dc45ce277c
MD5 f382774e034897330356c0e4c2696128
BLAKE2b-256 3b2cd096f54e0dec15a6808e7a493f6270b6db53ffa47f38c89311c379112b00

See more details on using hashes here.

File details

Details for the file betting_odds_tracker-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for betting_odds_tracker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d2b66d86b4d2c15c4843ed6cf6cb1a1ca2fc7c085010c993cd9098805435d5e
MD5 00393f780afe0a4f8c28cf181d6bcd5c
BLAKE2b-256 324fa1fec3790d7f01282d085760feb5483ef93c219e527e2acfbf6cb458310c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page