Betting Exchange APIs 2026: The Complete Automation Guide
Four betting exchanges support programmatic football trading in 2026: Betfair, Smarkets, Matchbook, and Betdaq. Each offers an open API, peer-to-peer liquidity, and no account limits for winners. They differ on commission rates (1.5%-5%), football liquidity depth, API maturity, and language library support. This guide compares them on every dimension that matters for arbitrage execution, value betting, and market making.
Quick Answer: Which Exchange API Should I Use?
Betfair Exchange API for football because it has 10-50x more liquidity than competitors on Premier League and Champions League markets. Smarkets API as a secondary for lower commission (2%) on niche markets where Betfair liquidity is thin. Matchbook for the lowest commission (1.5%) but limited football depth. Most sharp bettors run Betfair as primary and Smarkets as backup.
How Betting Exchanges Work
Peer-to-peer mechanics
A betting exchange matches two users with opposing views. One user "backs" (bets for an outcome) and another "lays" (bets against it). The exchange does not take a position. It earns commission on the winner's net profit. This is fundamentally different from a bookmaker, which sets odds and takes the opposite side of every bet.
Order book depth
Each market has an order book showing available back and lay prices at various odds. "Liquidity" means how much money is available to be matched at each price level. Deep liquidity (Betfair on Premier League) means you can place large bets without moving the price. Thin liquidity (Matchbook on lower leagues) means large bets shift the market.
Commission models
Exchanges charge commission on net winnings per market, not per bet. If you win £100 and lose £80 on the same market, you pay commission on £20 net profit. Rates: Betfair 5% (reducible), Smarkets 2% (flat), Matchbook 1.5% (flat), Betdaq 2-5% (variable). For high-volume traders, the commission difference between 5% and 2% compounds to thousands per year.
Why exchanges welcome automation
Automated traders add liquidity to the order book. More liquidity means tighter spreads, which attracts more users, which generates more commission. Exchanges profit from volume, not from bettors losing. This is why they offer free APIs and never restrict winning accounts. The incentive structure is aligned with sharp bettors.
Betting exchanges never restrict winning accounts because they profit from commission on all activity, not from bettors losing. Betfair Exchange has the deepest football liquidity globally with Premier League match-odds markets regularly holding £500,000+ in available volume.
Betfair Exchange API
Betfair is the dominant betting exchange globally. For football automation, it is the default choice because of unmatched liquidity depth. The API ecosystem is the most mature in the industry.
| Capability | Details |
|---|---|
| Market listing | List all markets by sport, event, market type |
| Real-time odds | Streaming API (WebSocket) - no rate limit |
| Bet placement | Place, update, cancel orders programmatically |
| Order management | Query open orders, settled bets, P&L |
| Account management | Balance, transfers, statement |
| Rate limit (REST) | 1,000 requests/hour (free); higher on paid tiers |
| Rate limit (Stream) | Unlimited (WebSocket push) |
| Authentication | Certificate login (bots) or SSOID (interactive) |
| Commission | 5% on net winnings (reducible to 2% at high volume) |
| Premium charge | Additional 20-60% on £500k+ monthly profit |
Python libraries
betfairlightweight: Low-level API wrapper. Handles authentication, session management, request formatting. Install: pip install betfairlightweight. Flumine: High-level framework built on betfairlightweight. Handles market streaming, order management, strategy execution, and paper trading. Install: pip install flumine. Flumine is the recommended starting point for new projects.
Code example: simple lay strategy
import betfairlightweight
from flumine import Flumine, clients, BaseStrategy
from flumine.order.order import LimitOrder
# Authenticate with certificate
trading = betfairlightweight.APIClient(
username="your_user",
password="your_pass",
app_key="your_key",
certs="/path/to/certs"
)
trading.login()
class LayFavourite(BaseStrategy):
def process_market_book(self, market, market_book):
if market_book.status != "OPEN":
return
for runner in market_book.runners:
if runner.ex.available_to_lay:
lay_price = runner.ex.available_to_lay[0].price
if lay_price <= 1.50: # Lay heavy favourites
order = LimitOrder(
price=lay_price, size=10.0, side="LAY"
)
market.place_order(order)
framework = Flumine(client=clients.BetfairClient(trading))
framework.add_strategy(LayFavourite(
market_filter={"event_type_ids": ["1"]} # Football
))
framework.run() Simplified example. Production strategies require stake sizing, position limits, and error handling.
Full deep dive with authentication setup, streaming, and error handling: Betfair API guide.
The Flumine Python framework is the most widely-used library for Betfair Exchange automation, maintained by the betcode-org team on GitHub with active community support and both live trading and paper trading simulation modes.
Smarkets API
Smarkets offers the best commission rate among established exchanges at 2% flat. The API is clean, well-documented, and supports both REST and WebSocket. Football liquidity is lower than Betfair but competitive on Premier League and Champions League main markets.
Key specifications
Commission: 2% flat on net winnings (60% lower than Betfair's standard 5%). API: REST + WebSocket, documented at docs.smarkets.com. Python library: smarkets-client. Authentication: API key + session token. Rate limits: Generous (undisclosed exact number, higher than Betfair's free tier). Football liquidity: 10-50x less than Betfair on top markets, adequate for stakes under £500.
When Smarkets wins over Betfair
High-volume traders: At 2% vs 5% commission, a trader making £10,000/month net profit saves £300/month on Smarkets. Over a year, that is £3,600. Niche markets: Some lower-league football markets have comparable liquidity on Smarkets because fewer automated traders compete there. Diversification: Running Betfair + Smarkets simultaneously lets you arbitrage between exchanges when prices diverge.
Code example: posting a back order
import requests
API_BASE = "https://api.smarkets.com/v3"
headers = {"Authorization": "Session-Token YOUR_TOKEN"}
# Place a back order
order = {
"market_id": "12345678",
"contract_id": "98765432",
"side": "buy", # buy = back
"quantity": 1000, # in pence (£10.00)
"price": 5500, # 55.00% implied probability
"type": "limit"
}
resp = requests.post(
f"{API_BASE}/orders", json=order, headers=headers
)
print(resp.json()) Matchbook API
Smarkets charges 2% commission on net winnings versus Betfair's 5%, making Smarkets the better choice for high-volume traders despite lower liquidity. Matchbook offers the lowest commission of any major betting exchange in 2026 at 1.5%.
Matchbook offers the lowest commission in the market at 1.5% flat. The exchange is smaller than Betfair and Smarkets but growing. Football coverage is decent for Premier League and Champions League, weak for lower leagues.
Key specifications
Commission: 1.5% flat (lowest available). API: REST, documented at matchbook.com/developers. Python library: matchbook-client (community-maintained, less mature). Authentication: Username/password + session token. Rate limits: Standard REST limits. Football liquidity: Lower than Smarkets, adequate for stakes under £200 on top markets.
When Matchbook wins
Commission-sensitive high-volume: At 1.5% vs 5% (Betfair), a trader making £20,000/month saves £700/month. Diversification: Third exchange for cross-exchange arbitrage opportunities. Growing markets: Matchbook is actively investing in football liquidity. Markets that are thin today may be competitive in 12-18 months.
Limitations: Less mature API documentation. Fewer community resources and code examples. Lower liquidity means larger orders move the market. Not suitable as a primary exchange for football automation.
Betdaq API
Betdaq is a legacy exchange owned by Entain since 2013. It has the smallest market share of the four exchanges but still operates with an API and some unique European football coverage.
Key specifications
Commission: 2-5% (variable by market and volume). API: Exists but documentation is less comprehensive than competitors. Football liquidity: Lowest of the four exchanges. Best for: Edge cases where Betdaq has liquidity that others lack (some Irish and niche European markets). Ownership: Entain (parent of Ladbrokes, Coral) provides stability but limited investment in growth.
For most football automation projects, Betdaq is not worth the integration effort. The liquidity is too thin for reliable execution. Include it only if you are building a multi-exchange system and want maximum market coverage.
All 4 Exchanges Compared
| Feature | Betfair | Smarkets | Matchbook | Betdaq |
|---|---|---|---|---|
| Commission | 5% | 2% | 1.5% | 2-5% |
| Football liquidity | Highest | Medium | Low-Med | Low |
| API maturity | Highest | High | Medium | Low |
| Python library | Flumine | smarkets-client | matchbook-client | Limited |
| WebSocket streaming | Yes | Yes | Yes | No |
| Rate limit (free) | 1k/hr | Higher | Higher | Lower |
| Country availability | Wide | UK/EU | UK/EU | UK/EU |
| Best for | All-purpose | Niche mkts | Low-comm | Edge cases |
Betfair Exchange charges 5% commission on net winnings (reducible for high volume), Smarkets charges 2% flat, and Matchbook charges 1.5% flat. All three offer free APIs with no account restrictions for winning bettors. Betfair has 10-50x more football liquidity than competitors on Premier League markets.
Picking Your Primary Exchange
If you need football liquidity above all: Betfair
Premier League, Champions League, World Cup, La Liga, Bundesliga. Betfair has deep order books on all major football markets. You can place £1,000+ bets without moving the price. No other exchange comes close for football. Start here.
If you are high-volume and commission-sensitive: Smarkets or Matchbook
At £10,000+ monthly net profit, the commission difference between 5% (Betfair) and 2% (Smarkets) is £300/month. At £20,000+, Matchbook's 1.5% saves even more. The tradeoff: lower liquidity means you cannot always get matched at your target price. Best for traders who can split orders across time.
If you want diversification: Run 2 simultaneously
Betfair as primary (liquidity) + Smarkets as secondary (lower commission on niche markets). This also enables cross-exchange arbitrage when the same market is priced differently on both platforms. The additional complexity is manageable with a unified execution script.
If you are in the US: None of these
Betfair, Smarkets, Matchbook, and Betdaq are all unavailable to US residents. US bettors who want peer-to-peer trading should use Kalshi (CFTC-regulated event contracts) or Crypto.com event contracts. See our main automation guide for the full jurisdiction breakdown.
Hybrid Arbitrage Workflow: Soft Book + Exchange
The most common use of exchange APIs is the hybrid arbitrage workflow: automated exchange execution + manual soft book placement. The exchange leg is automated because exchanges have APIs. The soft book leg is manual because soft books block automation.
Architecture
Signal arrives from data layer
RebelBetting or Bet Hero detects an arb: back at soft book (e.g., Bet365 at 2.10), lay at Betfair (at 2.05). Alert delivered via Telegram or Discord in 2-5 seconds.
Script parses and validates
Your Python script receives the alert, extracts market ID, selection, odds, and calculates optimal lay stake using the arbitrage formula: lay_stake = (back_odds × back_stake) / lay_odds.
Script places Betfair lay order
Using betfairlightweight or Flumine, the script places a LimitOrder on the Betfair Exchange. Execution time: 200-500ms from signal receipt. The order sits in the order book waiting to be matched.
You place the soft book bet manually
Open Bet365 (or whichever soft book has the edge), navigate to the market, place the back bet. Total elapsed time from alert: 15-30 seconds.
Script monitors and manages risk
If the soft book refuses your bet (odds moved, stake limited), the script cancels the unmatched Betfair order. If both legs are placed, it logs the trade with expected profit.
Code skeleton
# Hybrid arb execution - Betfair lay leg
import betfairlightweight
trading = betfairlightweight.APIClient(
username="user", password="pass",
app_key="key", certs="/certs"
)
trading.login()
def execute_lay(market_id, selection_id, lay_price, lay_stake):
"""Place a lay order on Betfair Exchange."""
order = trading.betting.place_orders(
market_id=market_id,
instructions=[{
"selectionId": selection_id,
"side": "LAY",
"orderType": "LIMIT",
"limitOrder": {
"size": round(lay_stake, 2),
"price": lay_price,
"persistenceType": "LAPSE"
}
}]
)
return order
def cancel_if_unmatched(market_id, bet_id):
"""Cancel unmatched order if soft book leg fails."""
trading.betting.cancel_orders(
market_id=market_id,
instructions=[{"betId": bet_id}]
)
# Called when RebelBetting alert arrives:
# execute_lay("1.234567890", 12345, 2.05, 100.0) Production code requires error handling, retry logic, and order status monitoring. See our full Betfair API guide for complete examples.
For the signal layer that triggers this workflow, see our RebelBetting automation guide and Bet Hero review (fastest Discord alerts at ~2 seconds).
Frequently Asked Questions
Which betting exchange has the most football liquidity?
Is the Betfair API free to use?
What is the difference between Betfair commission and Smarkets commission?
Can I use betting exchanges from the United States?
What is the Betfair Streaming API and why use it?
Do betting exchanges restrict winning accounts?
What is Flumine and why do bettors use it?
Can I arbitrage between two betting exchanges?
Related guides
- Automation hub: exchanges, brokers, prediction markets
- Sharp bookmaker brokers: Mollybet, Sportmarket, BetInAsia
- Prediction markets: Kalshi, Polymarket, Crypto.com
- Betfair API deep dive: authentication, streaming, code examples
- RebelBetting automation: alerts, one-click, hybrid workflows
- Complete sure betting (arbitrage) guide