同じ賭けでもブックメーカーによって価格が違います。ラインショッピングとは、その中で最良の価格を選ぶことです。このスクリプトは、米国のブックメーカーのNFLの全ラインを比較します。
複数のブックメーカーをまとめて取得する
1回のリクエストで1試合のすべてのブックメーカーが返るため、結合する作業はありません。region=usで米国のブックメーカーに絞り、limit=3で次の3試合を取得します。呼び出しは1クレジットです。
スクリプトを実行する
キーをDINO_API_KEYとしてエクスポートし、Python 3で実行します。
import json import os from datetime import datetime, timezone from urllib.request import Request, urlopen URL = "https://api.dino.markets/v2/odds?league=nfl®ion=us&limit=3" request = Request(URL, headers={"Authorization": f"Bearer {os.environ['DINO_API_KEY']}"}) with urlopen(request, timeout=30) as response: events = json.load(response)["events"] now = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") for event in events: if event["start_time"] <= now: # only games that have not started continue prices = {} # (market, outcome, point) -> [(decimal, american, book)] for book in event["books"]: for market in book["markets"]: for o in market["outcomes"]: key = (market["key"], o["name"], o.get("point")) prices.setdefault(key, []).append((float(o["price"]), o["american"], book["name"])) print(" at ".join(p["name"] for p in sorted(event["participants"], key=lambda p: p["role"]))) for (market, name, point), offers in sorted(prices.items(), key=str): if len(offers) < 2: # nothing to compare at this line continue best, worst = max(offers), min(offers) if best[0] == worst[0]: # every book offers the same price continue label = f"{market} {name}" if point is not None: label += f" {float(point):+g}" if market == "spread" else f" {float(point):g}" extra = 100 * (best[0] - worst[0]) print(f" {label}: {best[1]} at {best[2]}, worst {worst[1]} at {worst[2]}, {extra:.2f} more per 100 staked ({len(offers)} books)")
2026年11月25日03:33 UTCに実行した出力の最初の試合:
Green Bay Packers at Los Angeles Rams moneyline Green Bay Packers: +120 at FanDuel, worst +112 at Bally Bet, 8.00 more per 100 staked (5 books) moneyline Los Angeles Rams: -134 at DraftKings, worst -142 at FanDuel, 4.20 more per 100 staked (5 books) spread Green Bay Packers +2.5: -108 at FanDuel, worst -110 at DraftKings, 1.70 more per 100 staked (5 books) spread Los Angeles Rams -2.5: -109 at DraftKings, worst -112 at FanDuel, 2.40 more per 100 staked (5 books) total Over 43.5: -114 at betPARX, worst -121 at DraftKings, 5.40 more per 100 staked (4 books) total Under 43.5: +101 at DraftKings, worst -106 at Bally Bet, 7.00 more per 100 staked (4 books)
差を読む
Packersに100を賭けて的中すると、2.20なら220、2.12なら212が戻ります。賭けの内容もリスクも同じで、条件のよいブックメーカーは8多く支払います。
同じ条件で比較する
スプレッドやトータルは、同じpointでのみ比較できます。スクリプトは市場、結果、pointで価格をまとめるため、トータル44は43.5とは別に表示されます。1社しかないラインと、全社が同じ価格のラインは省きます。
質問
取引所や予測市場は含まれますか?
region=usでは含まれません。region=us_exにあるほか、booksで指定することもできます。
代替ラインがないのはなぜですか?
APIが提供するのは、各ブックメーカーのスプレッドとトータルのメインラインです。
見つけた最良価格でまだ賭けられますか?
まずブックメーカーで確認してください。updated_atは価格を最初に確認した時刻で、価格はいつでも変わります。
他の競技でも使えますか?
はい。leagueをGET /v2/leaguesの試合リーグに変更してください。