Genesis Arbitrage

Genesis Arbitrage · · 15 min read

Sports odds API for arbitrage betting: events, odds and surebets via API

In short

  • A sports odds API returns events, markets and every sportsbook's odds with the time of the last update. The implied probability of decimal odds is 1/k, and the price of a YES contract on a prediction market is the same probability in dollars.
  • A surebet exists when 1/k of the best odds across all outcomes of a market adds up to less than 1, and each stake is proportional to 1/k. Most mistakes happen in matching: the match, market, period and line must be the same on every platform.
  • In mode=sport on the Pro and Max plans, Genesis API returns pre-match surebets across 13 platforms with a stake_unit for every leg. Their profit_usd is null because the sportsbook's stake limit is unknown.

A sports odds API, also called a sports betting API, gives a program the betting line: events, markets and every sportsbook's odds, with the time each price was last updated. From this data a program compares prices across platforms and finds surebets — bets on every outcome of a match that end in profit whatever the result, as long as every bet is accepted and settled under the same rules. This is arbitrage betting, and Genesis API serves ready-made surebets across 13 platforms through the /predictions/arbitrage endpoint with mode=sport.

What a sports odds API returns

Providers name their fields differently, but an odds API describes the line on five levels. Without the period and line two odds can't be compared, and without the time you can't tell whether a price still stands. The right column is an illustrative example.

LevelWhat it holdsExample
EventSport, competition, teams, startFootball, Bundesliga, Bayern — Dortmund
MarketBet type, period, lineTotal 2.5, regulation time
OutcomeWhat the bet is onOver 2.5
PriceEach sportsbook's oddsFonbet @1.95, Winline @2.02
TimeWhen the price was updated12 seconds ago

Odds arrive as decimal, fractional or American, and prediction platforms quote a contract price in dollars instead of odds. The data comes either from a platform's own open API or from a provider that collects many sportsbooks' lines into one format. Polymarket and Kalshi data is covered in the article on the Polymarket and Kalshi APIs.

Odds, probability and prices in cents

Decimal odds show how much comes back for every dollar staked, stake included: $100 at @2.25 turns into $225. The reciprocal is the implied probability: 1 / 2.25 = 0.4444, or 44.44%. Fractional and American odds convert to decimal with the formulas in Betting odds explained.

PriceDecimal oddsProbability
@2.25 at a sportsbook2.2544.44%
@3.60 at a sportsbook3.6027.78%
YES at 30¢ on Polymarket1 / 0.30 = 3.3330%

A YES contract pays $1 if its outcome happens, so its dollar price is the market's probability estimate. A NO contract on "Bayern to win" wins if Dortmund wins or the match is drawn, like double chance.

At a single sportsbook the probabilities of all outcomes in a market add up to more than 1, and the excess is its margin. Illustrative example: Fonbet's line on Bayern — Dortmund, 2.15 / 3.45 / 3.40, gives 0.46512 + 0.28986 + 0.29412 = 1.04910, a 4.91% margin. The step-by-step calculation is in How to calculate bookmaker margin.

How to find a surebet from odds

A surebet is found from the best prices across sportsbooks: for each outcome of the market, take the highest odds and add up 1/k. Illustrative example: the same match, the match result market on regulation time.

OutcomeBest oddsWhere1/k
1, Bayern win@2.25Betcity0.44444
X, draw@3.60Marathon0.27778
2, Dortmund win@3.80Winline0.26316

L = 0.44444 + 0.27778 + 0.26316 = 0.98538

The sum is below 1, so there is a surebet, with a profit of 1 / 0.98538 − 1 = 1.48%. The four sportsbooks' own lines in the code below carry margins of 3.8% to 5.1%; the surebet comes from how differently they priced the match.

The total stake is split in proportion to 1/k: out of $1,000 the home win gets 1,000 × 0.44444 / 0.98538 = $451.04, and the other stakes are in the table.

BetStakeIf it wins
Betcity · 1 @2.25$451.04$1,014.84
Marathon · X @3.60$281.90$1,014.84
Winline · 2 @3.80$267.06$1,014.83

Every outcome returns about 1,000 / 0.98538 = $1,014.84; the worst-case profit is $14.83 because of stake rounding.

The same logic in code, with one market's line at four sportsbooks as input:

# Illustrative example: one 1X2 market line at four sportsbooks
line = {
    "Fonbet":   {"1": 2.15, "X": 3.45, "2": 3.40},
    "Betcity":  {"1": 2.25, "X": 3.20, "2": 3.40},
    "Marathon": {"1": 2.05, "X": 3.60, "2": 3.50},
    "Winline":  {"1": 2.10, "X": 3.35, "2": 3.80},
}


def surebet(line, bank):
    outcomes = next(iter(line.values())).keys()
    # best odds for each outcome and the sportsbook offering them
    best = {o: max((odds[o], bk) for bk, odds in line.items())
            for o in outcomes}
    total = sum(1 / k for k, _ in best.values())
    if total >= 1:
        return None  # no surebet
    for o, (k, bk) in best.items():
        print(f"{o}: {bk} @{k} — ${bank / k / total:.2f}")
    return round((1 / total - 1) * 100, 2)


print(surebet(line, 1000), "%")  # 1.48 %

A two-way market — handicap, totals, both teams to score — has two keys in the dictionary, and the formula stays the same. Stake rounding and recalculating after the odds move are covered in the lesson How to calculate a surebet.

Matching: one match, market, period and line

The formula only holds if every price belongs to the same market of the same match. Sportsbooks spell team names differently, start times differ by minutes, and markets have their own names. A matching error produces a false surebet: 1/k adds up to less than 1, yet on one of the outcomes every bet loses.

What to checkWhere it goes wrongField in mode=sport
Match and squadBayern vs Bayern II, a women's or youth teamteams, flags
StartOne sportsbook has the match rescheduledstarts_at
Market typeResult, handicap, total, BTTS, correct scoremarket_type
PeriodRegulation time or the match with overtimeperiod
LineHandicap −1.5 and −1.25 are different betsline
Leg outcomesTogether the legs must cover every outcomelegs[].covers

Regulation time in football is 90 minutes plus stoppage time. Betting platforms usually settle the match result, handicaps and totals in football and hockey on it, unless the market name says overtime and shootouts are included. A winner market on a prediction platform may include overtime, and then a regulation-time draw can lose the whole pair.

A handicap pairs into a surebet with the opposite handicap of the same size: home −1.5 and away +1.5. On a quarter Asian handicap such as −0.75 the stake splits in half across the two adjacent lines, and home −0.75 with away +0.75 also covers every score. Totals pair on one line: over 2.5 with under 2.5.

The reverse pair, over 2.5 and under 3.5, is a middle: with three goals both bets win. In Genesis API line and period are set once for the whole surebet, so legs with different lines never end up in one row.

Surebets via Genesis API: mode=sport

The /predictions/arbitrage endpoint with mode=sport returns surebets where this work is already done: events are matched across platforms, the best prices are picked and prediction-platform legs are walked through the order book with fees. There are 13 platforms: Polymarket, Kalshi, Predict.fun and 10 betting platforms — Fonbet, Betcity, Olimpbet, Marathon, 5051X, Melbet, Winline, BC.Game, EGB and Dafa Sports. Pre-match only: once a match starts, its surebet leaves the response.

The mode is part of the Pro ($100 a month, a new snapshot every 10 s) and Max ($200, every 5 s) plans; on Trial and Start the request returns 403 plan_restricted. The API does not return each sportsbook's full line: the response holds only the surebets found, with the platform, outcome and price of every leg.

curl -G "https://api.genesisarbitrage.com/v1/predictions/arbitrage" \
  -H "X-API-Key: gns_live_XXXXXXXXXXXXXXXX" \
  -d mode=sport -d sport=soccer -d min_profit_pct=1.5

Illustrative example: a mode=sport row from the documentation with recalculated prices:

{
  "id": "s:8812:RT:TOT:2.5:",
  "kind": "sport",
  "match": "sport",
  "title": "Arsenal — Chelsea",
  "category": "sports",
  "sport": "soccer",
  "league": "Premier League",
  "teams": ["Arsenal", "Chelsea"],
  "market_type": "TOT",
  "period": "RT",
  "line": 2.5,
  "score": null,
  "starts_at": 1794700800,
  "size_usd": 1000,
  "profit_usd": null,
  "profit_pct": 2.39,
  "legs": [
    {
      "platform": "polymarket",
      "side": "yes",
      "outcome": "Over 2.5",
      "covers": ["O"],
      "price_avg": 0.505,
      "odds": null,
      "stake_unit": 0.505,
      "currency": "USD"
    },
    {
      "platform": "fonbet",
      "side": "bet",
      "outcome": "Under 2.5",
      "covers": ["U"],
      "odds": 2.12,
      "stake_unit": 0.471698,
      "currency": "RUB"
    }
  ]
}

The five levels of the line map to the row's fields:

LevelFieldsIn the example
Eventtitle, sport, league, teams, starts_atArsenal — Chelsea, soccer, Premier League
Marketmarket_type, period, line, scoreTOT, FT, 2.5
Legplatform, side, outcome, coversfonbet, bet, Under 2.5, U
Priceodds, price_avg, stake_unit, currency2.12, 0.471698, RUB
Resultsize_usd, profit_pct, profit_usd1000, 2.39, null

market_type is the market: WIN — match result, HCP — handicap, TOT — total, BTTS — both teams to score, CS — correct score, with the score in score. side is yes or no for a contract purchase and bet for a bet at odds. covers lists the outcomes a leg covers: here O is over and U is under.

How to split the stake by stake_unit

stake_unit is how much to put on a leg for it to return $1 if it wins. For a bet at odds it is 1 / odds: 1 / 2.12 = 0.471698. For a YES or NO purchase it is the average order-book price including the fee; the illustrative example has no fee, so stake_unit equals price_avg.

The units add up to 0.505 + 0.471698 = 0.976698, so the profit is 1 / 0.976698 − 1 = 2.39%. Split your own amount S with the surebet formula: leg stake = S × stake_unit / Σ stake_unit. For $500:

LegStakeIf it wins
Polymarket · YES "Over 2.5" at 50.5¢$258.52511.92 shares — $511.92
Fonbet · Under 2.5 @2.12$241.48$511.94

Either outcome returns about $511.93, a worst-case profit of $11.92. size_usd is how much the prediction platforms' order books absorb at these prices. Here it is $1,000: 1,000 / 0.505 ≈ 1,980.2 shares, so the Fonbet bet could go up to 1,980.2 × 0.471698 ≈ $934.06 if the sportsbook accepts it.

profit_usd is null because the dollar profit depends on how much Fonbet accepts, and the sportsbook does not publish its stake limit. That is why the min_profit_usd filter drops every surebet with a sportsbook leg — filter them by min_profit_pct instead.

The Fonbet bet is in rubles (currency = RUB). At an illustrative rate of 80 ₽ per $1 that is 241.48 × 80 = 19,318.40 ₽, and under 2.5 returns 19,318.40 × 2.12 = 40,955.01 ₽. The exchange-rate spread on conversion is not included in profit_pct.

Python: football surebets with min_profit_pct

The script requests football surebets with a profit of 1.5% or more, prints each with the time until kick-off and splits the BANK amount across the legs by stake_unit. The key comes from the GENESIS_API_KEY environment variable; how to get one is in the quick start.

import os
import time

import requests

API = "https://api.genesisarbitrage.com/v1"
HEADERS = {"X-API-Key": os.environ["GENESIS_API_KEY"]}
PARAMS = {"mode": "sport", "sport": "soccer", "min_profit_pct": 1.5}
BANK = 500  # total stake for the whole surebet, $


def fetch():
    while True:
        r = requests.get(f"{API}/predictions/arbitrage",
                         headers=HEADERS, params=PARAMS, timeout=10)
        if r.status_code in (429, 503):
            time.sleep(int(r.headers.get("Retry-After", "5")))
            continue
        if r.status_code == 403:
            raise SystemExit("mode=sport needs the Pro or Max plan")
        r.raise_for_status()
        return r.json()["data"]


def unit(leg):  # $1 of winnings: stake_unit, else 1/odds or price
    if leg.get("stake_unit"):
        return leg["stake_unit"]
    return 1 / leg["odds"] if leg.get("odds") else leg["price_avg"]


for row in fetch():
    mkt = [row["market_type"], row["line"], row["period"]]
    mkt = " ".join(str(v) for v in mkt if v is not None)
    hours = (row["starts_at"] - time.time()) / 3600
    print(f"{row['profit_pct']}% · {row['title']} · {mkt} · "
          f"starts in {hours:.1f} h")
    total = sum(unit(leg) for leg in row["legs"])
    for leg in row["legs"]:
        price = leg.get("odds") or leg.get("price_avg")
        print(f"   {leg['platform']}: {leg['outcome']} at {price} — "
              f"${BANK * unit(leg) / total:.2f} ({leg['currency']})")

Each leg's amount is printed in dollars next to the platform's currency: convert a ruble bet at your own rate. If a leg has no stake_unit, unit falls back to 1 / odds or price_avg without the fee, so the profit comes out slightly higher than it really is.

To track new surebets, repeat the request every meta.freshness_sec and compare id values: each surebet keeps its id. A filtered response comes without an ETag, so you save quota through the interval: every 10 s on Pro is 86,400 / 10 = 8,640 calls a day and 8,640 × 30 = 259,200 per 30 days against a 5M quota, see Genesis API limits. The league, platform (for example fonbet) and max_days filters are described in the prediction markets endpoints guide.

Risks the API can't check

The API prices a surebet from a snapshot, while you place the bets on two or three platforms yourself, and each of them can break the math.

Betting is regulated differently from country to country: check your local laws and each platform's rules. The working order and all the risks are collected in the lesson Surebet risks and working rules, and how the search works is explained in Surebet scanner.

Columns, filters and tags are described in the Sport mode guide.

Questions and answers

Is there a free sports odds API?

It depends on the provider: request allowances and the list of sportsbooks and markets vary, and free access, where it exists, is limited in volume. Polymarket and Kalshi serve market data through their official APIs without a key (Polymarket, Kalshi), but those are YES and NO contract prices with no sportsbook odds. Genesis API has no free plan: mode=sport is on Pro ($100 a month) and Max ($200); compare plans on Genesis API pricing.

Does the API have live odds?

Not in Genesis API: sport mode looks for pre-match surebets only, and a surebet leaves the response once the match starts. Why live arbs break more often is covered in Pre-match vs in-play arbitrage.

Why is profit_usd null for a surebet?

At least one leg is a sportsbook bet, and the sportsbook does not publish the stake limit for your account. The profit_pct percentage is known; work out each leg's amount from stake_unit.

Can I place bets through Genesis API?

No. Genesis API only reads data: you place bets and purchases yourself on the platforms, using the links in legs[].url.