fbpx
Skip to content

Automation Series: Introduction to API

What is an API?

API stands for Application Programming Interface, and basically it just means how computers communicate with each other as opposed to how you would type on a computer. Two computers can talk to each other in a really fast way using an API.

Why would a punter want to use the Betfair API instead of a desktop or a mobile app?

It’s the speed. You can bet automatically according to the rules that you set. If you’re looking for prices like favourites or looking at specific time from the jump, looking at price movements, etc. you’ll find the accuracy is much improved.

You can also react a lot faster if you’re looking for price movements, for example, and then it helps you get on with your life. If you want to be betting on UK racing that happens at night, automation is the way to go.

There’s a lot of clients out there that use the Betfair API. They punch in data, you can automate betting. So you build models and you can just tap in and have it running in the background.

What role is AI playing?

AI models can generally figure out how an API works, but it can be confidently wrong. It can fill in gaps in its knowledge with other similar APIs that may look very similar but functionally are different. However, AI models are improving very, very quickly so that accuracy gap is dropping significantly and quickly.

It seems like the use of AI is growing every day and AI in betting is growing every day.

Since big update to AI in February of this year. You can monitor how a price moves. You could get a signal sent to you on an app and it says this runner has shortened by X amount. You can go and manually place that bet.

You can log your results either during the day or the end of the day as well and analyse your profit and loss and your strike rate and things like that.

Can this help with Responsible Gambling measures?

AI can build a dashboard for you that can track how much you’re losing or how much you’re winning, hopefully, how much commission you’re paying and things like that, and filter by anything really, like days of the week, jurisdictions, bet sizes and work out how to be more profitable.

You can look at things like where you are making more profit or what’s letting you down in terms of your strategy, specific tracks or specific times of day, days of the week etc.

Do you need any special account to tap into the Betfair API? And how do I get an API key?

Any punter can use the API from their Betfair account.

We’ve got instructions on our automation hub site on how to do that. It’s a completely self-serve process where you go into the backend visualizer page and then generate a set of keys. You can only do that once for the entire life of the account, so that set of keys is yours forever.

And you’ll get two keys, which will be an active delayed key where prices are delayed and a live key, which gives you the up-to-date prices.

Any advice on the best computer language program for customers to use?

The most popular one amongst our customers is Python.

Python and Java, C Sharp, etc. are different languages that you use to do different things. Automatically, we’ll get programs to run for you.

The main reason we recommend Python is there is a package within Python. A bit of software that is written actively uses the Betfair API. It makes it simpler to use, and that’s actively supported and updated.

 

How can you learn more?

We’ve done some other videos on our YouTube channel, Automation Series. Then you’ve got tutorials on our Automation Hub. Then there’s heaps of tutorials online for just installing Python and getting started with code.

But overall, you do need to spend some time familiarizing yourself with the language and with the package and the Betfair API in general. It’s a bit of a learning curve. I assume the use of AI will help searching and typing and asking these questions to your AI.

How do you keep your account secure with an API?

You can do the two-factor authentication as well as adding certificates to your account. They can be used to log in more securely, adding an extra layer of authentication.

Basically, it’s saying to the computer or to Betfair, I’ve got this certificate here, and I’ve given you another certificate. Basically, if I send this certificate to you when I log in, I’m confirming that I am who I say I am and not some hacker.

It’s generally recommended that customers use certificates as it adds an extra layer of security, especially if your account balance grows. If you’re successful, the more important the security becomes.

There are some great online tutorials. We’ve got one on the Automation Hub that helps you generate them in a few minutes.

Watchlist
Go To Betfair App