Guides / Build an odds alert bot

Build an odds alert bot

By the dino.markets team · Updated 25 Nov 2026

This bot reads NFL moneylines from five places every five minutes and prints a line when a price has moved.

Decide what counts as a move

The script turns each price into its implied chance, 100 / decimal. It alerts when that chance is 1 point or more away from the saved price. Smaller moves keep the old price saved, so several of them add up to an alert.

Run the script

Export your key as DINO_API_KEY, save this as alerts.py and run it with Python 3. Stop it with Ctrl+C.

import json
import os
import time
from datetime import datetime, timezone
from urllib.request import Request, urlopen

URL = ("https://api.dino.markets/v2/odds?league=nfl&markets=moneyline"
       "&books=draftkings,fanduel,pinnacle,kalshi,smarkets&limit=100")
STATE = "prices.json"
MOVE = 1.0   # alert when the implied chance moves this many points
EVERY = 300  # seconds between reads

def read():
    request = Request(URL, headers={"Authorization": f"Bearer {os.environ['DINO_API_KEY']}"})
    with urlopen(request, timeout=30) as response:
        return json.load(response)["events"]

def check(last):
    now = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
    events = [e for e in read() if e["start_time"] > now]  # only games that have not started
    seen = {}
    for event in events:
        for book in event["books"]:
            for o in book["markets"][0]["outcomes"]:
                key = f"{event['id']}|{book['key']}|{o['side']}"
                price = float(o["price"])
                old = last.get(key)
                if old is None:
                    seen[key] = [price, o["american"]]
                    continue
                moved = 100 / price - 100 / old[0]
                if abs(moved) >= MOVE:
                    print(f"{now} {o['name']} at {book['name']}: {old[1]} to {o['american']} ({moved:+.1f} points)")
                    seen[key] = [price, o["american"]]
                else:
                    seen[key] = old  # keep the old price, so small moves add up
    print(f"{now} read {len(events)} games")
    return seen

try:
    with open(STATE) as file:
        last = json.load(file)
except FileNotFoundError:
    last = {}

while True:
    try:
        last = check(last)
        with open(STATE, "w") as file:
            json.dump(last, file)
    except OSError as error:
        print("read failed:", error)
    time.sleep(EVERY)

Part of a run on 25 Nov 2026 with EVERY set to 60 seconds:

Output
2026-11-25T03:37:20Z read 30 games
2026-11-25T03:38:21Z Jacksonville Jaguars at Smarkets: -1667 to -1111 (-2.6 points)
2026-11-25T03:38:21Z Los Angeles Chargers at Smarkets: -122 to -108 (-3.1 points)
2026-11-25T03:38:21Z read 30 games

Work out the cost

Each read is one call and costs 1 credit, however many games it returns. One read every five minutes is 288 credits a day, or 8,640 in 30 days. Every 30 minutes is 48 a day. To spend less, read less often.

We read most books every 30 to 60 seconds; Kambi books, Paddy Power and Smarkets every 1.5 to 2.5 minutes, so asking faster than that mostly returns the same prices.

Questions

Can the API send me changes?

No. Your script asks for the odds and compares them with the last answer.

Why measure the chance and not the American price?

American odds jump from -100 to +100, so the same step means different things at different prices. A change in implied chance reads the same for every price.

What happens when the script restarts?

It loads prices.json and compares the next read with the saved prices.

Can I watch spreads and totals?

Yes. Change markets, loop over every market and add the market and point to the saved key.