What is betting automation?
Betting automation allows punters and traders to use software to analyse betting markets, identify opportunities and place bets automatically.
An automated betting system can monitor odds, liquidity, market movements and betting signals in real time, allowing users to execute strategies without manually placing each wager.
On Betfair, betting automation is powered through the Betfair API, which allows software to interact directly with exchange markets.
Whether you’re building sports betting automation tools, horse racing automation strategies or fully automated betting software, Betfair provides the infrastructure required to automate your betting activity.
Sports betting automation
Sports betting automation involves using software to monitor sporting events and automatically place bets when predefined criteria are met.
Popular sports for betting automation include:
- AFL
- NRL
- Soccer
- Tennis
- Cricket
- Basketball
Automated sports betting systems can react to market changes faster than manual bettors and remove emotional decision-making.
Horse Racing Automation
Horse racing automation is one of the most popular applications of betting automation. Automated systems can analyse racing form, ratings, market prices and liquidity to determine when to place bets.
Common horse racing automation strategies include:
- Value betting
- Market making
- BSP betting
- Scalping
- Dutching
- Automated trading
Through the Betfair Exchange, horse racing automation can be applied across thoroughbred and harness racing markets as well as similar strategies on greyhound racing.
How can you automate your bets on the Betfair Exchange?
Betfair Exchange automation allows users to interact with the Betfair Exchange through the Betfair API (Application Programming Interface).
In simple terms, the Betfair API is how computers communicate with Betfair markets programmatically instead of manually using the website or mobile app.
Using automation on the Betfair Exchange allows punters, traders and developers to build software that can analyse markets, place bets automatically and react to price movement in real time.
What can you do with Betfair Automation?
Automated wagering on the Betfair Exchange enables users to leverage technology to bet faster, more frequently and more efficiently than manual tools and generate data and insights on a wide range of markets. Automation enables using market signals like prices and liquidity to determine when (or if) to bet into a market and how to manage positions. It can also facilitate betting into markets that occur during unsociable hours like overnight or during business hours in a controlled way.
How does Betfair Automation work?
An automation is typically a piece of software, which may or may not have a glossy interface (or could just be a plain text file), which connects to the Betfair back-end and either subscribes to a stream or requests information explicitly about a market to make informed decisions.
Once information about the markets has been supplied to the “bot” (e.g. market id, selection id, price), then the bot can make a decision about whether or not to place a bet in the instance based on various rules or triggers.
Examples of rules and triggers:
- If a selection has had $0 in matched volume, ignore it
- If a selection has available back volume in the first 2 boxes of more than $50, then back it
- If there are still more than 5 minutes before the scheduled race start, keep waiting
Whilst writing software has traditionally been reserved for the professional coder, advances in AI tools (even free versions) have significantly reduced the barrier to entry in this space. It is also possible to find others who have done the hard work for you and have a ready-made Betfair-approved tool in the Betfair App Directory.
What kind of betting strategies can I use with automation?
There are two primary modes of operation when it comes to automated strategies, though most punters exist somewhere in the middle with a hybrid version.
- Market-informed strategies are strategies that primarily use information from the Betfair market to inform their strategy such a prices, volume and seconds to jump
- Modelled strategies are strategies that primarily use information derived from a rated price or probability generated by a model or system that uses form and statistical data for that sport or racing code.
- A hybrid strategy would generally have an underlying data model and then utilise information from the market to decide on whether to bet, the side or the stake of the bet.
There are several named strategy types common within the betting landscape and each of these tend to relate back to the primary modes as outlined above:
- Value Betting – Comparing a rated price to a market price to determine whether it is good value to back or lay
- Arbitrage – Backing high on a bookmaker and laying on Betfair at a lower price
- Scalping/Trading – Backing high and laying low within the same Betfair market
- Market Making – Putting up bets on most or all selections within a market to offer liquidity to others whilst locking in a position
- Dutching/Hedging – Betting multiple runners in a race to spread risk
How can I figure out what kind of strategy to use?
Generally, the first step here is to get your hands on some historical data, ideally both of Betfair market data and statistical or form data relevant to the sport or racing code. Some of this data is easy to find, and some less so, and some data may not be free.
Betfair data is freely accessible by contacting the Betfair Australia automation team (automation@betfair.com.au).
Statistical data sources include:
- Punting Form for Thoroughbred Racing (paid)
- Topaz for Greyhound Racing (free through Betfair)
- app for Harness Racing (paid)
- fitzRoy for AFL
As well as many free API packages on GitHub for US Sports.
Once you’ve gathered your data, you can then proceed to build a data model with machine learning and use the Betfair data to back-test (meaning generate theoretical historical profit based on your strategy).
Machine Learning Models for Betting
Machine learning models use historic betting data and market behaviour to identify patterns and estimate probabilities.
Machine learning models can analyse truly enormous datasets (larger even than the maximum number of rows that Excel will display) in a fraction of the time compared to manual analysis. They can, with proper direction, use this data to generate features and, by extension, a fair probability of a certain outcome occurring.
These tools are fairly robust and have been around for much longer than LLMs like ChatGPT and are much less prone to common issues like hallucinations. However, there will be a learning curve in terms of cleaning the dataset as well as generating features that avoid data leakage (future data not available at the time of bet placement)
Done properly, these tools can generate rated prices or probabilities for use in a Betfair automation.
What tools can you use for Betfair automation?
The primary tool for most coders will be Python and a code editing program (like Microsoft’s Visual Studio Code) where they can write their program, either from scratch or using a pre-built framework or wrapper like Flumine or Betfairlightweight.
These programs can be setup to run on a local machine or use a virtual machine in the cloud like AWS (if the region is set to a Betfair-licensed country)
What are the risks and limitations?
Like any manual betting strategy, automation carries financial risk where you effectively give the keys to your Betfair account, by extension, its balance to a program running autonomously and potentially unattended.
Therefore, it is critical that programs are not left unattended during the testing phase, where you ensure that bets are being placed according to the strategy rules, with controls in place to log and manage errors, as well managing bankroll.
Additionally, there are constraints in place on the Betfair side that dictate the number of markets you can read and the conditions under which bet placement is allowed. For example, Betfair Australia accounts have a default maximum exposure of $15,000 regardless of your actual account balance, and any requests for an increase are subject to a mandatory 7-day cooling-off period. As well, Australian customers are not permitted to bet on a sporting event once the event has begun, unless they call the Betfair customer service team.
There is also the risk that you’ve overfitted or over-optimised your strategy in such a way that historical results are a product of natural variance as opposed to a genuine edge. Generally, the way to avoid that is to increase the sample size (the higher the odds, the bigger the sample needs to be).
Is Betfair automation right for me?
Overall, it’s a good fit for punters who are data-oriented or for whom the frequency and volume of bets required to implement a strategy becomes unmanageable due to time-commitments or just the time of day where these events happen. (e.g. NBA matches often take place during normal business hours or UK racing happens during the middle of the night).
There is a learning curve associated with it, although this has been flattened with the introduction of generative AI tools. However, these tools don’t replace learning, and some intervention will be needed with whatever tool you use. Betfair does not recommend providing your account credentials to anyone, including an AI-assistant.
How do I get started?
- Learn the exchange first
- Build your first model
- Use paper trading/testing
- Start with simple automations
Helpful Links:
- Betfair Automation Hub – https://betfair-datascientists.github.io/
- Betfair Developer Forum – https://forum.developer.betfair.com/
- Betfair API Documentation – https://docs.developer.betfair.com/
- Betfair Australia Automation Team – automation@betfair.com.au
- Betfair Quants Discord – https://forms.office.com/r/ZG9ea1xQj1