Building & Deploying a Betfair Bot
Level ∞ - BILL BETTOR
Do you have a friend who likes betting and would like to sharpen his/her action? Help them on their path by sharing the BowTiedBettor Substack. Win and help win!
Welcome Degen Gambler!
It’s time to enter one of the most dangerous territories in betting markets, the Betfair Exchange.
There is a decent barrier to entry [knowledge-wise],
It’s one of very few places where you won’t be thrown out for winning a bet or two,
you’ll naturally be up against the creme de la creme of gambling markets. Therefore, tread carefully or get rekt [& poor].
Betfair is peer-to-peer, i.e. every time you get matched on a trade there’s another gambler out there taking the other side of it, much like classic order book action in crypto/stock markets. Compared to the other ‘real’ betting alternative, parimutuels [where everyone places their bets & the odds are calculated at post time], this gambler-to-gambler matching is *a great feature* since it only requires you to beat *one counterparty* as opposed to a complete market [weighted average of many opinions]. Not really a relevant fact in highly liquid instruments [why?] but far from every market is perfectly liquid. Finding one degen is easier than finding a whole army of them [the latter may present a far superior opportunity though].
Now, since we’re on this side of the web we won’t just enter the exchange markets with boring, manual trading.
Instead we’ll utilize one of the great advantages of Betfair, the Betfair API, & code up a Betting Bot that will do the work for us.
For a gentle introduction to the Betfair API, see this post.
So what’s a Betting Bot?
It’s simple, really.
You have *an idea/a potential edge* which [if your plan is to make any money from it] can be converted into A Trade.
With this idea/trade setup, you’ve got two options.
Option Number One: stay at the desk 24/7, scan the markets manually to look for opportunities where you could run The Trade, & then run it if certain conditions/requirements are satisfied.
Option Number Two: map your thoughts/conditions into code & let your computer perform the tasks for you.
Needless to say, Option Number Two is the better option.
Note: We’re assuming you’re in it to *win it* [long-term] here. If you’re only going to place a trade or two on rare one-time events it of course makes no sense to do it programmatically.
But how do we *actually go through* with Option Number Two, i.e. Build & Deploy A [hopefully profitable] Betfair Bot?
Well, that’s what this post will explain.