Guides / Compare NBA odds from Kalshi, Polymarket, DraftKings and FanDuel in Python

Compare NBA odds from Kalshi, Polymarket, DraftKings and FanDuel in Python

By the dino.markets team · Updated 3 Dec 2026

On 3 Dec 2026 at 16:05 UTC, a $1 payout on the NBA favourite cost less on both Kalshi and Polymarket than at DraftKings and FanDuel in 6 of 7 games, by up to 5¢. One request returns all four books, and this Python script prints that cost for each.

import json
import os
from urllib.request import Request, urlopen

BOOKS = ["draftkings", "fanduel", "kalshi", "polymarket"]
URL = f"https://api.dino.markets/v2/odds?league=nba&books={','.join(BOOKS)}&markets=moneyline&status=scheduled&limit=100"
request = Request(URL, headers={"Authorization": f"Bearer {os.environ['DINO_API_KEY']}"})

with urlopen(request, timeout=30) as response:
    events = json.load(response)["events"]

print("Favourite".ljust(46), *(b.ljust(11) for b in BOOKS))
for event in events:
    prices = {}  # book key -> {team: decimal price}
    for book in event["books"]:
        for market in book["markets"]:
            if market["key"] == "moneyline" and all(o["price"] for o in market["outcomes"]):
                prices[book["key"]] = {o["name"]: float(o["price"]) for o in market["outcomes"]}
    if not all(b in prices for b in BOOKS):
        continue  # only games all four books price
    teams = list(prices[BOOKS[0]])
    if len(teams) != 2 or any(set(prices[b]) != set(teams) for b in BOOKS):
        continue  # every book must price the same two teams
    favourite = min(teams, key=lambda t: sum(prices[b].get(t, 99) for b in BOOKS))
    # Cost of a $1 payout: a decimal price of 1.25 returns $1.25 per $1, so $1 costs 80 cents.
    cents = [f"{100 / prices[b][favourite]:.0f}¢" for b in BOOKS]
    other = next(t for t in teams if t != favourite)
    print(f"{favourite} v {other}".ljust(46), *(c.ljust(11) for c in cents))

Output, read 3 Dec 2026 at 16:05 UTC:

Output
Favourite                                      draftkings  fanduel     kalshi      polymarket 
Miami Heat v Washington Wizards                82¢         82¢         81¢         80¢        
Cleveland Cavaliers v Chicago Bulls            62¢         62¢         60¢         59¢        
Portland Trail Blazers v Utah Jazz             80¢         81¢         78¢         78¢        
Philadelphia 76ers v Atlanta Hawks             56¢         55¢         54¢         56¢        
San Antonio Spurs v Dallas Mavericks           76¢         78¢         74¢         75¢        
Boston Celtics v Detroit Pistons               61¢         59¢         56¢         56¢        
Portland Trail Blazers v Memphis Grizzlies     67¢         65¢         64¢         63¢

Set your key

Create a key in the dashboard and export it as DINO_API_KEY. The script uses only the Python standard library and sends the key in the Authorization: Bearer header. The one call costs 1 credit, and the Free plan has 1,000 a month.

Ask for the four books

books=draftkings,fanduel,kalshi,polymarket limits the answer to those four sources. dino.markets matches each game across them, so one event holds every book’s moneyline. Kalshi and Polymarket come back as decimal and American odds like the sportsbooks.

Keep games every book prices

The script skips a game unless all four books have a moneyline. status=scheduled leaves out games in play, where a book can pause its prices, and limit=100 asks for up to 100 games in one call. Games days away often have no sportsbook line yet, and their prediction market asks can be far off because almost nobody trades them.

Turn prices into cents

A decimal price of 1.25 returns $1.25 for each $1 staked, so a $1 payout costs 80¢. The script works that out for each book: 100 divided by the price. It is also the win chance the price implies, and Kalshi and Polymarket quote their contracts this way. A lower number is a better price.

Where the books differ

On the 76ers, Polymarket cost the most of the four. The Celtics had the widest gap: 61¢ at DraftKings against 56¢ on Kalshi and Polymarket. The Kalshi and Polymarket figures are the ask, and their trading fees narrow the gap a little.

To find the best price on each side instead, see line shopping across books. To check gaps between Kalshi and Polymarket, see Kalshi vs Polymarket arbitrage.

Questions

Can I get Kalshi, Polymarket and sportsbook odds in one request?

Yes. Ask /v2/odds with books=kalshi,polymarket,draftkings,fanduel. Each game comes back once, with every book's prices in the same shape. The call costs 1 credit.

Why do Kalshi and Polymarket often have the same price?

Traders keep the two order books in line, so gaps between them close fast. A sportsbook sets its own line with its margin built in, so it usually charges more for the favourite.

Are Kalshi and Polymarket prices the ask?

Yes, the order-book ask, the price to buy now. Trading fees come on top.

Can I run this for another league?

Yes. Change league=nba to any value from GET /v2/leagues, which is free. Soccer uses markets=moneyline_3way, with a draw.