How to get Betfair lay odds (and the alternatives)
OddsRelay · · Updated · 3 min read
Betfair's own Exchange API returns its lay prices, and the money available at each, once you have a Betfair account and an application key. That gets you one exchange's lay side. Pairing it with a bookmaker's back price is still your job.
Does Betfair have a public API for lay odds?
Yes. Betfair runs a documented developer programme for its exchange. You create an application key, log in to get a session token, and request prices for the markets you care about. The price call is listMarketBook. Ask for best offers in its price projection and each runner comes back with availableToBack and availableToLay: a price and the stake available at it. It is a legitimate, supported route.
Betfair sets the terms of access, and they change. Check the current conditions for application keys, and any fees, in Betfair's own developer documentation. A forum thread or a blog post, this one included, can be out of date.
What the direct route leaves with you
- One exchange. You see Betfair's lay price and nobody else's. When another exchange has a lower lay for the same runner, the Betfair API cannot tell you.
- A delayed key to start. The delayed application key returns prices on a delay. Undelayed data needs a live key, granted on Betfair's conditions. The Betfair API delay covers what that means for a build.
- Betfair's own ids. Markets and runners come with Betfair's identifiers and names. Mapping them to the same match and the same selection at each bookmaker is work you write and keep fixing.
- Session and upkeep. Logging in, keeping the session alive, handling errors and following the API's changes all stay with you, for one venue.
Why a lay price needs a back price beside it
For matched betting, a lay price on its own tells you little. What matters is the pair: a bookmaker's back price and an exchange's lay price for the same selection, with enough liquidity behind the lay to place the stake. The closer the lay sits to the back, the smaller the qualifying loss.
The numbers people compare pairs by are arithmetic on those two prices and your commission rate. Here is that arithmetic, written as you would write it on your side:
// back and lay are decimal prices, stake is your back stake, // commission is your exchange's rate as a fraction (0.02 for 2%). const rating = (back / lay) * 100; const layStake = (back * stake) / (lay - commission); const ifBackWins = stake * (back - 1) - layStake * (lay - 1); const ifLayWins = layStake * (1 - commission) - stake; // The two outcomes come out equal: that figure is the qualifying loss (or profit).
Qualifying loss and ratings explained goes further into the numbers.
What a matched feed sends instead
OddsRelay's matched boards put bookmaker back prices from 140+ bookmakers, 60+ of them live in the UK & Ireland beside lay offers from Betfair, Smarkets, Matchbook and BETDAQ. Each outcome carries a back list and a lay list, and each lay offer names its exchange and the money available at that price.
{
"event_id": "or_evt_917dd44bce05",
"sport_key": "soccer_epl",
"sport_title": "Premier League",
"commence_time": "2026-09-20T14:00:00Z",
"home_team": "Arsenal",
"away_team": "Chelsea",
"markets": [{
"key": "h2h",
"outcomes": [{
"name": "Arsenal",
"back": [{ "bookmaker": "william_hill", "price": 2.9, "link": null }],
"lay": [
{ "exchange": "betfair_exchange", "price": 3.0, "available": 175, "link": null },
{ "exchange": "smarkets", "price": 3.05, "available": 240, "link": null }
]
}]
}]
}The pair arrives already matched to the same event and selection, so the id mapping above is not yours to maintain. Offers are paired against exchange lay and liquidity-gated. The rating and qualifying loss stay your arithmetic, and the oddsmatcher widget shows them.
The lay list holds each exchange's own offer, lowest price first. You choose between them: the best price, the most money available, or only the exchanges you hold accounts with. The exchanges filter narrows a request to the ones you name, and the matched board filters guide lists the rest. To do the pairing yourself, the raw product gives each exchange's back_price, lay_price and available beside every bookmaker's price, with no commission applied.
A matched board reply carries meta.processed_at, the board's time, and meta.last_seen, the last read of each venue and sport, so you can bound a price's age yourself. The freshness guide covers both.
Which route fits
If Betfair alone is your product, go direct. The same holds for in-play: the feed is built for pre-match data and has no in-play product, so in-play lay prices mean a live Betfair key. If you are building a matched-betting tool, build on the pair. One exchange's lay side is the easy half of that job.
Start with live coverage
Check which exchanges and bookmakers are live today on the coverage page, and read the quickstart for your first request. When you want a key, request access.