Turn a bonus bet into cash with Python
Convert a stake not returned bonus bet into near guaranteed cash. Place the bonus on the long price, hedge the other side at another book, and keep most of the value.
Guide · Updated June 2026
A bonus bet, or free bet, usually returns only the winnings, not the stake. You can turn most of its value into real cash by placing the bonus on one side at a long price, then hedging the other side with real money at a different bookmaker. Whichever way the game lands, you keep a fixed amount, called the retention. This guide builds a scanner in Python that pulls head to head odds over the RapidOddsAPI REST endpoint and finds the highest retention bonus turnover on every game.
Bookmakers hand out bonus bets all the time. The catch is almost always that the stake is not returned, so a 100 dollar bonus on a winner at 2.00 pays 100, not 200. Left alone a bonus bet is a gamble. Hedged properly it becomes a known amount of cash, no matter the result. The maths is short, and the only hard part is scanning enough books to find the best price to put the bonus on, which is what the odds API does.
How bonus turnover works
Because the bonus only pays its winnings, you want it on the longest price you can find, since a longer price means more winnings. Then you back the other side with real cash at another book, sized so both outcomes pay the same.
- Bonus leg. Your free bet on one team at a long price. If it wins, it pays bonus × (odds - 1), the winnings only.
- Hedge leg. Real cash on the other team at a different book, sized so the payout matches the bonus leg.
- Retention. The cash you keep as a percent of the bonus. A typical free bet retains roughly 70 to 80 percent at long odds.
To make the two outcomes equal, the hedge stake is:
The profit is then hedge_stake × (hedge_odds - 1), the same whichever side wins, and the retention is that profit over the bonus amount. The key rule that falls out of the maths: put the bonus on the longer price and hedge the shorter one. Do it the other way around and you keep far less.
Step 1: pull the odds
Ask the REST endpoint for head to head odds from the books you can bet with. The bonus book and the hedge book just need to be different.
Step 2: group each game and collect prices
The response returns one entry per game and book, so merge the same game first, then collect every price for each team. This is the same setup as the arbitrage scanner. We match games by team name, which is fine for a single matchup. See the game matching guide for the robust version.
Step 3: the bonus turnover maths
This is the whole calculation. Given the price you put the bonus on and the price you hedge at, work out the hedge stake, the profit, and the retention.
Step 4: try the bonus on each side
For each game you do not know in advance which side has the longer price, so try the bonus on each team against the other team as the hedge, at different books, and keep the best retention. Because retention is highest on the longer price, this naturally picks the right side.
The full scanner
Put it together. It pulls the odds, groups each game, finds the best bonus turnover, and lists every game sorted by retention so the best conversions are at the top.
What you get back
Each game prints the best conversion: which side to put the bonus on, where to hedge, and what you keep. The best results come from games with a clear outsider, since the bonus goes on the long price. Pointed at an NRL slate, the top conversion looks like this:
Put the 100 dollar bonus on the Titans at 4.60, and 281.25 of your own cash on the Panthers at 1.28. If the Titans win, the bonus pays 360 in winnings and the hedge loses 281.25, leaving 78.75. If the Panthers win, the hedge pays 360 and cost 281.25, leaving 78.75, and the bonus cost you nothing real. Either way you have turned a 100 dollar free bet into 78.75 in cash, a 78.7 percent retention.
Notice the hedge is larger than the bonus. That is normal, because to cover a long bonus leg you need to stake more real cash on the short side. The longer the price you put the bonus on, the more you keep, so retention is highest on games with a big outsider. Short, even matchups convert worse. A close game where the longest price is around 2.60 retains closer to 57 percent.
Things to know
- Longer is better. The bonus belongs on the longest price you can find, so wider odds and more books both raise your retention. See the full bookmaker coverage.
- Set a minimum. In a real tool you would only act on conversions above a retention you are happy with, for example 70 percent, rather than taking every game.
- Check the terms. Bonuses vary. Some are stake returned, some restrict the minimum odds you can bet at, some exclude certain markets. The maths here assumes a standard stake not returned free bet.
- Prices move. The hedge price can drift before you place it. To act on a conversion while it is live, stream prices over the WebSocket feed.
Next steps
You have a working bonus turnover scanner. For the guaranteed profit plays on the same data, see the arbitrage scanner and the middles scanner. For the full range of tools you can build, see what you can build with an odds API, or read the API documentation.
Start building with RapidOddsAPI
Real-time, standardised odds from 100+ bookmakers over REST and WebSocket. Start free with 250 credits, no credit card required.