Get a free key

Guide: Python

Build an odds alert bot for Discord

By the end of this guide you will have a Python bot that watches the next 36 hours of NRL games at your bookmakers and posts to a Discord channel whenever a price moves by two points of implied chance or a book moves its line: one message per game, with the book, the old and new numbers and the size of the move. It takes about twenty minutes to set up, and the free plan runs it while you build.

Before you start

What you need

Python
3.9 or later, with requests installed.
A key
The free Developer plan covers the NRL in season with every listed book but bet365. A bot left running all day outgrows its 1,000 credits a month; the credits maths is further down.
Discord
A server where you can manage webhooks.
Time
About twenty minutes.

The alert bots page has a thirty-line bot that shows the idea. This one is built to leave running: it measures moves fairly across short and long prices, follows line moves, survives a restart and respects Discord's limits.

Status, 13 Oct 2026. /v1 opens to keys shortly; until then requests are redirected to the docs, and the script stops with a message that says so. Written against the SockOdds v1 contract and tested against its schemas, on a mock that serves the v1 shape, with Discord's replies stood in for. A run against the live feed is pending; its date and league will be added here when it has run. The NRL is off season until March, so that first run will watch the NFL or MLB, which the same code reads unchanged.

Step 1

Make a webhook in Discord

In your server, open Server Settings, then Integrations, then Webhooks, and choose New Webhook. Give it a name, pick the channel it posts to and use Copy Webhook URL. The bot reads that address from an environment variable, so it never sits in the code:

terminal
export DISCORD_WEBHOOK_URL="paste-the-webhook-url-here"
export SOCKODDS_KEY="paste-your-key-here"

Treat the webhook address like a password: anyone who has it can post to that channel. If it leaks, delete the webhook and make a new one.

Step 2

Settings

odds_bot.py: settings
import json
import os
import sys
import time
from collections import defaultdict
from datetime import datetime, timedelta, timezone
from urllib.parse import urljoin

import requests

API = "https://api.sockodds.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['SOCKODDS_KEY']}"}
WEBHOOK = os.environ["DISCORD_WEBHOOK_URL"]

BOOKS = ["sportsbet", "tab", "ladbrokes"]
MARKETS = "winner,handicap,total_points"
# Post a move of two points of implied chance or more: 1.72 to 1.65 is one, 8.00 to 7.50 is not.
MOVE = 0.02
# Games starting in the next 36 hours. Each game returned costs one object, plus one per price, every poll.
LOOKAHEAD = timedelta(hours=36)
# The last prices and lines seen, on disk, so a restart neither reposts nor forgets.
STATE = "odds_bot_state.json"
TEAM_SIDES = ("home", "away", "competitor_1", "competitor_2")
# A line is watched on one side of each market; the other side is its mirror.
LINE_SIDES = ("home", "over", "competitor_1")

MOVE is the setting that decides whether the channel is worth reading. A threshold in cents treats every price alike, but ten cents is a big move on a favourite and nothing on an outsider: 1.50 to 1.40 takes the implied chance from 66.7% to 71.4%, almost five points, while 8.00 to 7.90 moves it by less than a fifth of a point. Measured in implied chance, two points means the same thing at every price.

LOOKAHEAD is the quota setting: every game returned costs an object on every poll, and each price on it one more, so watching only the next 36 hours keeps next week's games out of the count. LINE_SIDES watches each line on one side only, because a handicap's home and away lines move together.

Step 3

Read the window

odds_bot.py: reading
def get(url, params=None):
    """GET with the key. Waits when the API says to (over the per-minute limit, or briefly
    busy); stops with the API's own reason on any other refusal, a used-up month included."""
    for _ in range(5):
        r = requests.get(url, params=params, headers=HEADERS, timeout=30)
        problem = r.json() if "problem+json" in r.headers.get("content-type", "") else {}
        if r.status_code in (429, 503) and problem.get("title") != "Monthly allowance reached":
            time.sleep(max(1.0, float(r.headers.get("retry-after", 60))))
            continue
        if r.status_code >= 500:
            r.raise_for_status()  # a server error: the caller decides whether to try again
        if problem:
            raise SystemExit(f'{problem["status"]} {problem["title"]}: {problem["detail"]}')
        if r.status_code != 200 or "json" not in r.headers.get("content-type", ""):
            raise SystemExit(f"{r.status_code} from {r.url}: not a JSON answer from the API")
        return r.json()
    raise SystemExit(f"{url}: still asked to wait after five tries")


def every(url, params):
    """Every item of a listing, following links.next (which may be relative) across pages."""
    while url:
        page = get(url, params)
        yield from page["data"]
        url, params = (urljoin(url, page["links"]["next"]) if page["links"]["next"] else None), None


def fetch(league):
    """Every game starting inside the window, with the watched markets at your books."""
    now = datetime.now(timezone.utc)
    return list(every(f"{API}/odds", {
        "league": league,
        "markets": MARKETS,
        "bookmakers": ",".join(BOOKS),
        "starts_after": now.strftime("%Y-%m-%dT%H:%M:%SZ"),
        "starts_before": (now + LOOKAHEAD).strftime("%Y-%m-%dT%H:%M:%SZ"),
    }))

One request returns every game starting in the window, with only the watched markets at only your books: markets and bookmakers trim the response, and starts_after and starts_before trim the games. A game that has started leaves the window, so the bot stops posting about it.

get and every are the same as in the arbitrage guide: they wait when the API says to, follow links.next even when it is relative, and stop with the API's own reason when waiting will not help, such as a wrong key or a used-up month. A server error is raised for the loop in step 8 to deal with.

Step 4

Keys that survive a line move

odds_bot.py: reading quotes
def price_label(book, market, o):
    """'tab: Carlton', 'tab: Carlton -12.5', 'tab: Over 165.5', 'tab: Patrick Cripps Over 28.5'."""
    who = o["name"]
    if market["subject"]:
        who = f'{market["subject"]["name"]} {who}'
    if o["line"] is None:
        return f"{book}: {who}"
    line = format(o["line"], "+g" if o["side"] in TEAM_SIDES else "g")
    return f"{book}: {who} {line}"


def line_label(book, market, o):
    """'tab: Carlton handicap', 'tab: total points', 'tab: Patrick Cripps player disposals'."""
    words = [market["name"].lower()]
    if market["subject"]:
        words.insert(0, market["subject"]["name"])
    elif o["side"] in TEAM_SIDES:
        words.insert(0, o["name"])
    return f'{book}: {" ".join(words)}'


def read(events):
    """Every available quote: prices by game, outcome and book; main lines by game, book
    and market; and a label for each, ready to post."""
    prices, lines, labels = {}, {}, {}
    for event in events:
        for market in event["markets"]:
            subject = market["subject"]["name"] if market["subject"] else ""
            for o in market["outcomes"]:
                for p in o["prices"]:
                    if not p.get("available") or not p["decimal_odds"]:
                        continue
                    book = p["bookmaker"]
                    key = f'{event["id"]}|{o["id"]}|{book}'
                    prices[key], labels[key] = p["decimal_odds"], price_label(book, market, o)
                    if o["line"] is None or market["alternate"] or o["side"] not in LINE_SIDES:
                        continue
                    key = f'{event["id"]}|{book}|{market["key"]}|{market["period"]}|{subject}'
                    lines[key], labels[key] = o["line"], line_label(book, market, o)
    return prices, lines, labels

Prices and lines need different keys. A price is followed by game, outcome ID and book: the response lists each outcome once, with every book's price under it, and the outcome ID is the same on every poll, so the same key always means the same bet. Prices name their book by key, such as tab, and so do the alerts.

A line cannot be followed that way. When TAB moves Carlton from -12.5 to -14.5, the API serves -14.5 as a new market with new outcome IDs, and the old one simply disappears. So the bot follows each book's main line by game, book, market, period and player instead, and reads the number off it each poll. A market with alternate false is the main line, the one the book leads with.

Step 5

What moved

odds_bot.py: changes
def changes(old, new, labels):
    """What moved since the last poll, grouped by game ID."""
    alerts = defaultdict(list)
    for key, now in new["prices"].items():
        before = old["prices"].get(key)
        if before is None:
            continue
        shift = 1 / now - 1 / before  # in implied chance: above 0 means the price shortened
        if abs(shift) >= MOVE:
            text = f"{labels[key]} {before:.2f} to {now:.2f} ({shift * 100:+.1f} pts)"
            alerts[key.split("|")[0]].append(text)
    for key, now in new["lines"].items():
        before = old["lines"].get(key)
        if before is not None and before != now:
            alerts[key.split("|")[0]].append(f"{labels[key]} line {before:g} to {now:g}")
    return alerts

Each price is compared with the last one seen for the same key, and the move is reported in points of implied chance: positive when the price shortened, which is usually money coming in on that side. A quote seen for the first time has nothing to compare with, so the first poll after a fresh start posts nothing and only remembers.

Step 6

Post one message per game

odds_bot.py: posting
def post(event, alerts):
    """One Discord message per game, as an embed. Waits out Discord's own rate limit, and
    returns False, saying why, when the message did not go, so its moves are tried again."""
    shown = alerts[:20] + ([f"and {len(alerts) - 20} more"] if len(alerts) > 20 else [])
    body = {
        "allowed_mentions": {"parse": []},
        "embeds": [{
            "title": f'{event["name"]}, starts {event["scheduled_start"][11:16]} UTC',
            "description": "\n".join(shown),
            "color": 0xFFB020,
            "footer": {"text": "Prices can be minutes old. Check them at the bookmaker."},
            "timestamp": datetime.now(timezone.utc).isoformat(),
        }],
    }
    for _ in range(3):
        try:
            r = requests.post(WEBHOOK, json=body, timeout=10)
        except requests.RequestException as e:
            print(f'Discord: {event["name"]} not posted ({e})')
            return False
        if r.status_code != 429:
            if not r.ok:
                print(f'Discord: {event["name"]} not posted ({r.status_code} {r.text[:200]})')
            return r.ok
        wait = r.json().get("retry_after", 1) if "json" in r.headers.get("content-type", "") else 1
        time.sleep(float(wait))  # Discord says how long, in seconds, in the body
    print(f'Discord: {event["name"]} not posted, still rate limited after three tries')
    return False
  • An embed per game keeps a busy poll readable: the game and its start time as the title, one line per move, and a footer that says how fresh the prices are.
  • allowed_mentions set to nothing means no team or player name can ever ping the channel.
  • Twenty lines at most. An embed's text has a limit, and a channel flooded by one game is not read anyway.
  • Discord has its own rate limit. A 429 from Discord carries retry_after in seconds in its body; the bot waits that long and tries again, up to three times. If the message still has not gone, or Discord refuses it, the bot prints why and reports the game as unsent, so its moves are not marked as posted.

Step 7

Remember between polls, and between restarts

odds_bot.py: state
def load():
    try:
        with open(STATE) as f:
            return json.load(f)
    except FileNotFoundError:
        return {"prices": {}, "lines": {}}


def save(state):
    with open(STATE + ".tmp", "w") as f:
        json.dump(state, f)
    os.replace(STATE + ".tmp", STATE)  # a crash mid-write never leaves a broken file


def poll(league):
    """One pass: read, compare with the last pass, post, remember. Returns what was posted."""
    events = fetch(league)
    prices, lines, labels = read(events)
    old, new = load(), {"prices": prices, "lines": lines}
    alerts = changes(old, new, labels)
    unsent = {event["id"] for event in events
              if alerts.get(event["id"]) and not post(event, alerts[event["id"]])}
    # A suspended quote keeps its last value until it returns; games out of the window are
    # dropped; a game whose message did not go keeps its old values, so it is posted next pass.
    watched = {event["id"] for event in events}
    for kind in ("prices", "lines"):
        kept = {k: v for k, v in old[kind].items() if k.split("|")[0] in watched}
        fresh = {k: v for k, v in new[kind].items() if k.split("|")[0] not in unsent}
        new[kind] = {**kept, **fresh}
    save(new)
    return {game: moves for game, moves in alerts.items() if game not in unsent}

State lives in a small JSON file, so stopping and starting the bot neither reposts old moves nor forgets where prices were. Two merge rules keep it honest. A quote that is suspended (available false) keeps its last value, so when it comes back any move while it was away is still reported. A game that has left the window is dropped, so the file does not grow forever. And a game whose message did not go keeps its old values, so the same moves are found and posted on the next pass. The file is written to a temporary name and then swapped into place, so a crash mid-write cannot leave it broken.

Step 8

The loop

odds_bot.py: main
def main(league="nrl"):
    while True:
        now = f"{datetime.now(timezone.utc):%H:%M} UTC"
        try:
            posted = poll(league)
            print(f"{now}: moves posted {sum(map(len, posted.values()))}, games with moves {len(posted)}")
        except requests.RequestException as e:  # a timeout, a dropped connection or a server error
            print(f"{now}: this pass failed ({e}); trying again next pass")
        time.sleep(300)  # five minutes, SockOdds' suggested poll for games 3 to 24 hours away

Poll, post, sleep five minutes, repeat. SockOdds suggests five minutes for games three to 24 hours away (two inside three hours), and it states no fixed refresh, so a shorter sleep mostly finds the same prices. Each pass prints one line, which is all the log a bot like this needs.

A pass can fail on the way: a timeout, a dropped connection, a server error. The loop prints the reason and tries again five minutes later, so a bad minute does not end the bot. A refusal that will not fix itself, such as the month's credits running out, stops it with the API's message instead of retrying forever.

The whole file

odds_bot.py

Save it, install requests, set the two variables from step 1 and start it. It runs until you stop it, so leave it in a terminal you keep open, or on a small always-on machine:

terminal
python3 -m pip install requests
python3 odds_bot.py nrl
odds_bot.py
"""A Discord odds alert bot: post price moves and line moves to a channel, one message per game.

    export SOCKODDS_KEY="your-key"
    export DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
    python odds_bot.py           # NRL
    python odds_bot.py afl       # another league

It polls every five minutes for games in the next 36 hours.
"""
import json
import os
import sys
import time
from collections import defaultdict
from datetime import datetime, timedelta, timezone
from urllib.parse import urljoin

import requests

API = "https://api.sockodds.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['SOCKODDS_KEY']}"}
WEBHOOK = os.environ["DISCORD_WEBHOOK_URL"]

BOOKS = ["sportsbet", "tab", "ladbrokes"]
MARKETS = "winner,handicap,total_points"
# Post a move of two points of implied chance or more: 1.72 to 1.65 is one, 8.00 to 7.50 is not.
MOVE = 0.02
# Games starting in the next 36 hours. Each game returned costs one object, plus one per price, every poll.
LOOKAHEAD = timedelta(hours=36)
# The last prices and lines seen, on disk, so a restart neither reposts nor forgets.
STATE = "odds_bot_state.json"
TEAM_SIDES = ("home", "away", "competitor_1", "competitor_2")
# A line is watched on one side of each market; the other side is its mirror.
LINE_SIDES = ("home", "over", "competitor_1")


def get(url, params=None):
    """GET with the key. Waits when the API says to (over the per-minute limit, or briefly
    busy); stops with the API's own reason on any other refusal, a used-up month included."""
    for _ in range(5):
        r = requests.get(url, params=params, headers=HEADERS, timeout=30)
        problem = r.json() if "problem+json" in r.headers.get("content-type", "") else {}
        if r.status_code in (429, 503) and problem.get("title") != "Monthly allowance reached":
            time.sleep(max(1.0, float(r.headers.get("retry-after", 60))))
            continue
        if r.status_code >= 500:
            r.raise_for_status()  # a server error: the caller decides whether to try again
        if problem:
            raise SystemExit(f'{problem["status"]} {problem["title"]}: {problem["detail"]}')
        if r.status_code != 200 or "json" not in r.headers.get("content-type", ""):
            raise SystemExit(f"{r.status_code} from {r.url}: not a JSON answer from the API")
        return r.json()
    raise SystemExit(f"{url}: still asked to wait after five tries")


def every(url, params):
    """Every item of a listing, following links.next (which may be relative) across pages."""
    while url:
        page = get(url, params)
        yield from page["data"]
        url, params = (urljoin(url, page["links"]["next"]) if page["links"]["next"] else None), None


def fetch(league):
    """Every game starting inside the window, with the watched markets at your books."""
    now = datetime.now(timezone.utc)
    return list(every(f"{API}/odds", {
        "league": league,
        "markets": MARKETS,
        "bookmakers": ",".join(BOOKS),
        "starts_after": now.strftime("%Y-%m-%dT%H:%M:%SZ"),
        "starts_before": (now + LOOKAHEAD).strftime("%Y-%m-%dT%H:%M:%SZ"),
    }))


def price_label(book, market, o):
    """'tab: Carlton', 'tab: Carlton -12.5', 'tab: Over 165.5', 'tab: Patrick Cripps Over 28.5'."""
    who = o["name"]
    if market["subject"]:
        who = f'{market["subject"]["name"]} {who}'
    if o["line"] is None:
        return f"{book}: {who}"
    line = format(o["line"], "+g" if o["side"] in TEAM_SIDES else "g")
    return f"{book}: {who} {line}"


def line_label(book, market, o):
    """'tab: Carlton handicap', 'tab: total points', 'tab: Patrick Cripps player disposals'."""
    words = [market["name"].lower()]
    if market["subject"]:
        words.insert(0, market["subject"]["name"])
    elif o["side"] in TEAM_SIDES:
        words.insert(0, o["name"])
    return f'{book}: {" ".join(words)}'


def read(events):
    """Every available quote: prices by game, outcome and book; main lines by game, book
    and market; and a label for each, ready to post."""
    prices, lines, labels = {}, {}, {}
    for event in events:
        for market in event["markets"]:
            subject = market["subject"]["name"] if market["subject"] else ""
            for o in market["outcomes"]:
                for p in o["prices"]:
                    if not p.get("available") or not p["decimal_odds"]:
                        continue
                    book = p["bookmaker"]
                    key = f'{event["id"]}|{o["id"]}|{book}'
                    prices[key], labels[key] = p["decimal_odds"], price_label(book, market, o)
                    if o["line"] is None or market["alternate"] or o["side"] not in LINE_SIDES:
                        continue
                    key = f'{event["id"]}|{book}|{market["key"]}|{market["period"]}|{subject}'
                    lines[key], labels[key] = o["line"], line_label(book, market, o)
    return prices, lines, labels


def changes(old, new, labels):
    """What moved since the last poll, grouped by game ID."""
    alerts = defaultdict(list)
    for key, now in new["prices"].items():
        before = old["prices"].get(key)
        if before is None:
            continue
        shift = 1 / now - 1 / before  # in implied chance: above 0 means the price shortened
        if abs(shift) >= MOVE:
            text = f"{labels[key]} {before:.2f} to {now:.2f} ({shift * 100:+.1f} pts)"
            alerts[key.split("|")[0]].append(text)
    for key, now in new["lines"].items():
        before = old["lines"].get(key)
        if before is not None and before != now:
            alerts[key.split("|")[0]].append(f"{labels[key]} line {before:g} to {now:g}")
    return alerts


def post(event, alerts):
    """One Discord message per game, as an embed. Waits out Discord's own rate limit, and
    returns False, saying why, when the message did not go, so its moves are tried again."""
    shown = alerts[:20] + ([f"and {len(alerts) - 20} more"] if len(alerts) > 20 else [])
    body = {
        "allowed_mentions": {"parse": []},
        "embeds": [{
            "title": f'{event["name"]}, starts {event["scheduled_start"][11:16]} UTC',
            "description": "\n".join(shown),
            "color": 0xFFB020,
            "footer": {"text": "Prices can be minutes old. Check them at the bookmaker."},
            "timestamp": datetime.now(timezone.utc).isoformat(),
        }],
    }
    for _ in range(3):
        try:
            r = requests.post(WEBHOOK, json=body, timeout=10)
        except requests.RequestException as e:
            print(f'Discord: {event["name"]} not posted ({e})')
            return False
        if r.status_code != 429:
            if not r.ok:
                print(f'Discord: {event["name"]} not posted ({r.status_code} {r.text[:200]})')
            return r.ok
        wait = r.json().get("retry_after", 1) if "json" in r.headers.get("content-type", "") else 1
        time.sleep(float(wait))  # Discord says how long, in seconds, in the body
    print(f'Discord: {event["name"]} not posted, still rate limited after three tries')
    return False


def load():
    try:
        with open(STATE) as f:
            return json.load(f)
    except FileNotFoundError:
        return {"prices": {}, "lines": {}}


def save(state):
    with open(STATE + ".tmp", "w") as f:
        json.dump(state, f)
    os.replace(STATE + ".tmp", STATE)  # a crash mid-write never leaves a broken file


def poll(league):
    """One pass: read, compare with the last pass, post, remember. Returns what was posted."""
    events = fetch(league)
    prices, lines, labels = read(events)
    old, new = load(), {"prices": prices, "lines": lines}
    alerts = changes(old, new, labels)
    unsent = {event["id"] for event in events
              if alerts.get(event["id"]) and not post(event, alerts[event["id"]])}
    # A suspended quote keeps its last value until it returns; games out of the window are
    # dropped; a game whose message did not go keeps its old values, so it is posted next pass.
    watched = {event["id"] for event in events}
    for kind in ("prices", "lines"):
        kept = {k: v for k, v in old[kind].items() if k.split("|")[0] in watched}
        fresh = {k: v for k, v in new[kind].items() if k.split("|")[0] not in unsent}
        new[kind] = {**kept, **fresh}
    save(new)
    return {game: moves for game, moves in alerts.items() if game not in unsent}


def main(league="nrl"):
    while True:
        now = f"{datetime.now(timezone.utc):%H:%M} UTC"
        try:
            posted = poll(league)
            print(f"{now}: moves posted {sum(map(len, posted.values()))}, games with moves {len(posted)}")
        except requests.RequestException as e:  # a timeout, a dropped connection or a server error
            print(f"{now}: this pass failed ({e}); trying again next pass")
        time.sleep(300)  # five minutes, SockOdds' suggested poll for games 3 to 24 hours away


if __name__ == "__main__":
    main(sys.argv[1] if len(sys.argv) > 1 else "nrl")

This file and its tests are going into a public repository; the link goes here when it exists. Until then, the file above is the one the tests run.

A run

What it posts

Run on 13 Oct 2026 against the v1 schema mock, whose one illustrative game has made-up prices. The mock's prices never move, so the state file was first set to Sportsbet's Carlton at 1.80 and TAB's Carlton line at -10.5, as if an earlier poll had seen them; one pass then posted this message:

the webhook body (mock run, 13 Oct 2026)
{
  "allowed_mentions": {"parse": []},
  "embeds": [{
    "title": "Carlton v Richmond, starts 08:40 UTC",
    "description": "sportsbet: Carlton 1.80 to 1.72 (+2.6 pts)\ntab: Carlton handicap line -10.5 to -12.5",
    "color": 16756768,
    "footer": {"text": "Prices can be minutes old. Check them at the bookmaker."},
    "timestamp": "2026-10-13T23:49:03.680306+00:00"
  }]
}

23:49 UTC: moves posted 2, games with moves 1

Reading it

Why these two, and not a third

Sportsbet's Carlton went from 1.80 to 1.72, from 55.6% to 58.1% implied: 2.6 points, over the threshold. TAB's line went from -10.5 to -12.5, and any line move is posted. Every other quote was seen for the first time, so it was only remembered. Had TAB's Richmond moved from 2.75 to 2.70, that is 0.7 of a point, and the bot would have stayed quiet.

Quota

How many credits a bot uses

Every plan counts credits, as SockOdds's pricing page reads on 18 November 2026: an odds call costs a credit per market returned, per region billed, and a league's featured markets count once for each page of up to 25 games. The bot names three featured markets and three books, which bill as one region, so a poll costs at most 3 credits for each page of games in the window, however many books price them. A month is roughly:

credits a poll × 12 polls an hour × hours a day × 30

Four games in the window fit one page, so a poll every five minutes for twelve hours a day is 3 × 12 × 12 × 30 = 12,960 credits a month: inside Starter's 30,000, past the free plan's 1,000. The free month covers about 333 polls, a little over two days at twelve hours a day: enough to build and test, not to run through a round. A shorter LOOKAHEAD, fewer markets, or running only on game days stretches every plan further. When the month's allowance is used, the API answers "Monthly allowance reached" and the bot stops with that message. Try your numbers in the calculator.

Changing it

Leagues, markets and channels

  • Another league: python3 odds_bot.py afl, or nfl, nba, nbl and epl on the free plan, with afl, nrl and mlb in season.
  • Player props: add a prop key to MARKETS, such as player_disposals_over_under in the AFL. Lines are followed per player, so a book moving a player from 28.5 to 30.5 is posted as a line move.
  • Steam: count how many books moved the same outcome the same way in one poll, and post only when it is two or more.
  • Telegram: replace post with a call to the Bot API's sendMessage (your bot token in the address, a chat_id and the text). Everything else stays.

The limits, said plainly. A price can be up to ten minutes old before it is withheld, so the bot reports moves minutes after they happen, never as they happen, and a price can move again before anyone acts on it. Check every price at the bookmaker. Fast Odds API supplies data only; whether and how you bet is your call.

Questions

Running the bot

Related: alert bots and the API, NRL prop line shopping, all guides.

Why does the bot wait five minutes between polls?

Because SockOdds states no single refresh interval, and five minutes keeps a pre-match board current. Polling faster spends credits on prices that mostly have not changed.

Will it repost old moves after a restart?

No. The last prices and lines are saved to odds_bot_state.json after every pass, and a restart picks up from there. Delete the file to start fresh; the first pass after that posts nothing.

Is there a push option instead of polling?

On Pro and Business, /v1/stream/odds is a WebSocket that checks every 15 seconds and sends a snapshot when something changed; a tick that changes nothing costs no credits. It replaces the loop; the prices are the ones the REST routes serve.

Can one bot watch several leagues?

Run one copy per league, each with its own STATE file name: a pass forgets games outside its own window, so two leagues sharing one file would keep wiping each other's prices. Every copy's polls draw on the same month's credits.

Start now

Your first Australian price is one request away.

Free key, no card, AFL and NRL included. Keys are issued on sockodds.com.