BetFair Exchange Odds API

Access BetFair Exchange odds via OddsPapi. No scraping, no commercial account required.

Live Odds
Exchange

Get Free API Key

About BetFair Exchange

Betfair Exchange is the world’s largest betting exchange, where users bet against each other rather than against the house. With no traditional bookmaker margin, exchange odds are typically closer to true probability than any sportsbook. Betfair Exchange pioneered concepts like trading, laying, and in-play betting that reshaped the industry.

Exchange data is a goldmine for developers. Betfair Exchange odds represent genuine market consensus: the price at which real money is willing to transact. Use exchange prices to calibrate implied probabilities, identify when bookmaker odds are mispriced, and power automated trading strategies that buy and sell positions as lines move.

OddsPapi aggregates Betfair Exchange prices alongside 300+ traditional bookmakers. Compare exchange odds against sharp and soft book lines in a single API call, no Betfair API key or Exchange account needed. The free tier includes 250 requests per month plus historical exchange data.

Quick Start: Access BetFair Exchange Odds

This example finds the next three Premier League fixtures and pulls BetFair Exchange on each. It prints how many markets BetFair Exchange carries on each fixture and how many have an open price:

import time
import requests
from datetime import datetime, timedelta, timezone

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.oddspapi.io/v4"
BOOKMAKER = "betfair-ex"
TOURNAMENT_ID = 17   # Premier League

def get(path, **params):
    # The key goes in the query. A 429 says in its body how long to wait.
    params["apiKey"] = API_KEY
    for _ in range(5):
        r = requests.get(f"{BASE_URL}/{path}", params=params)
        if r.status_code != 429:
            return r
        body = r.json()
        time.sleep(body.get("error", body).get("retryMs", 1000) / 1000 + 0.2)
    return r

# 1. The next three fixtures in the tournament
now = datetime.now(timezone.utc)
r = get("fixtures", tournamentId=TOURNAMENT_ID, **{"from": now.strftime("%Y-%m-%d"),
                                                   "to": (now + timedelta(days=10)).strftime("%Y-%m-%d")})
fixtures = r.json() if r.status_code == 200 else []      # 404 = no fixtures in the window
upcoming = sorted((f for f in fixtures if f["statusName"] == "Pre-Game" and f["startTime"] > now.isoformat()),
                  key=lambda f: f["startTime"])[:3]

# 2. Each fixture's odds from this bookmaker only
for fx in upcoming:
    print(f"{fx['participant1Name']} v {fx['participant2Name']}  {fx['startTime'][:16]}Z")
    r = get("odds", fixtureId=fx["fixtureId"], bookmakers=BOOKMAKER)
    time.sleep(1.0)
    if r.status_code != 200:
        print("  ", r.status_code, r.json().get("error", {}).get("message"))
        continue
    book = r.json().get("bookmakerOdds", {}).get(BOOKMAKER)     # no key when no requested book prices it
    if not book:
        print("   no price on this fixture yet")
        continue
    markets = book["markets"]
    open_ids = [mid for mid, m in markets.items()
                if any(p.get("active") is not False for o in m["outcomes"].values() for p in o["players"].values())]
    print(f"   {len(markets)} markets, {len(open_ids)} with an open price, first IDs {sorted(open_ids)[:5]}")

Why Use OddsPapi for BetFair Exchange Data?

Feature Direct Access OddsPapi
API Access Commercial account required Free tier available
Setup Time Days/weeks of negotiation 5 minutes
Other Bookmakers BetFair Exchange only 300+ bookmakers
Sharp Lines Not available Pinnacle, Singbet, SBOBet
Historical Data Not available Included free

Technical Specifications

Bookmaker Slug betfair-ex
Live Odds Yes
Classification Exchange
Data Format JSON (REST API)
WebSocket Available for live odds
Authentication API key (query parameter)

Available Markets

Access a wide range of betting markets from BetFair Exchange through our API:

  • Match Winner – Full Time Result (1X2)
  • Over/Under – Total goals, points, etc.
  • Asian Handicap – Line betting for balanced odds
  • Both Teams to Score – Yes/No markets
  • Player Props – Individual player markets (where available)
  • Live Markets – In-play odds that update in real-time

Start Using BetFair Exchange Data Today

Get access to BetFair Exchange odds plus 300+ other bookmakers. Free tier includes 250 requests per month.

  • No credit card required
  • 5-minute setup
  • Historical data included
  • WebSocket support for live odds

Get Free API Key
Read Documentation