이 봇은 5분마다 다섯 곳의 NFL 머니라인을 읽고, 가격이 움직이면 한 줄을 출력합니다.
변동의 기준 정하기
스크립트는 각 가격을 내재 확률 100 / decimal로 바꿉니다. 그 확률이 저장된 가격과 1포인트 이상 차이 나면 알립니다. 더 작은 움직임은 이전 가격을 저장한 채로 두므로, 여러 번 쌓이면 알림이 됩니다.
스크립트 실행
키를 DINO_API_KEY로 내보내고, 다음을 alerts.py로 저장해 Python 3로 실행하세요. 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)
EVERY를 60초로 설정한 2026년 11월 25일 실행의 일부:
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
비용 계산
조회 한 번은 호출 한 번이며, 반환하는 경기 수에 관계없이 1크레딧입니다. 5분마다 한 번 읽으면 하루 288크레딧, 30일이면 8,640크레딧입니다. 30분마다 읽으면 하루 48크레딧입니다. 덜 쓰려면 덜 자주 읽으세요.
대부분의 북메이커는 3060초마다, Kambi 계열, Paddy Power, Smarkets는 1.52.5분마다 읽으므로, 그보다 빠르게 요청하면 대부분 같은 가격이 반환됩니다.
자주 묻는 질문
API가 변경 사항을 보내 주나요?
아니요. 스크립트가 배당률을 요청해 이전 응답과 비교합니다.
왜 미국식 가격이 아니라 확률을 재나요?
미국식 배당률은 -100에서 +100으로 건너뛰므로 같은 폭이라도 가격대에 따라 의미가 다릅니다. 내재 확률의 변화는 모든 가격에서 같게 읽힙니다.
스크립트를 다시 시작하면 어떻게 되나요?
prices.json을 불러와 다음 조회를 저장된 가격과 비교합니다.
스프레드와 토탈도 지켜볼 수 있나요?
네. markets를 바꾸고 모든 마켓을 순회하며, 저장 키에 마켓과 point를 추가하세요.