Tennis match winner API: ATP/WTA singles probabilities, live and pre-match

A Monte Carlo model for ATP and WTA singles matches. Pre-match probabilities come from a Bradley-Terry model on current ranking points; matches already in progress are re-projected set by set from the live score, and every match is priced against live Kalshi contracts.

What it returns

How the model works

Each player's strength is their current ATP or WTA ranking points. A Bradley-Terry model turns the ratio of the two players' points into a pre-match win probability, with an exponent that controls how much ranking gaps matter and a blend toward a coin flip that hedges against surface, form and head-to-head, none of which ranking points alone can see.

For a match already in progress, that pre-match number is inverted into a single-set win probability by bisection, then only the sets left to play are simulated thousands of times from the actual score — so a player already up a set shows a higher live probability than their pre-match number, without needing point-by-point data. Best-of-five is applied only to the four ATP Grand Slams, detected by tournament name; every other event, including the WTA majors, is best-of-three.

How the market comparison works

Each match's two outcomes are matched to Kalshi's KXATPMATCH or KXWTAMATCH markets by player name, not by ticker, since Kalshi and the scoreboard can order a player's first and last name differently. Edge is the model probability minus the fee-adjusted Kalshi ask; markets below a minimum open interest are marked illiquid instead of scored.

2 ready-made examples

Each one is a saved configuration with its input filled in. Open it on Apify and run it in one click.

Common questions

Why ranking points instead of a full Elo rating?

ATP and WTA ranking points are public, updated weekly and already fold in a player's recent results. A Bradley-Terry model on points gives a calibrated pre-match probability without needing years of point-by-point match history to fit a separate rating system.

How does the live, in-progress projection work?

The pre-match probability is inverted into a single-set win probability by bisection, then only the sets still remaining are simulated by Monte Carlo from the current score. A player already up a set shows a higher live probability than their pre-match number, without needing point-by-point data, which the public ESPN feed does not provide.

Why are qualifying rounds excluded by default?

Qualifying matches almost never have a KXATPMATCH or KXWTAMATCH market on Kalshi, so scoring them by default would charge for rows with no market price to compare against. They can be turned on in the input.

Why is best-of-five only applied to the four ATP majors?

ESPN's own period field is unreliable and reports 5 sets even for a best-of-three ATP 250 event. The format is detected from the tournament name instead: best-of-five only for the four Grand Slams on the ATP side, best-of-three everywhere else, including the WTA majors.

Further reading

Projecting a tennis match while it's still being played, without point-by-point data — inverting a pre-match probability into a per-set one by bisection, and the ESPN doubles-draw bug that crashed the first real run.

Other models