Betfair API – Greening / Hedging / Cash out issues

On Friday 19th June, without any prior notification, Betfair introduced some changes and new rules to their API. This had the effect of preventing ALL API software users correctly hedging position on the Betfair betting exchange.

Typically this would have exhibited itself when trying to implement greening. The Betfair exchange wasn’t accepting orders correctly, leaving stray orders in your unmatched bet area. This meant that customers were left with slightly uneven positions in the market which they were trading.

Changes to the API should be announced in advance and that gives us time to implement and test any key changes. On this occasion Betfair changed the API without informing us, so the first we knew about it was when we spotted it ourselves when trying to hedging our own trading postions. Betfair didn’t acknoledge any changes until much later than evening.

Why did this happen?

Betfair felt the integrity of the exchange was threatened by an exploit that existed.

There has been a loophole in the way Betfair round bets for many years and is often exploited by a few users so it’s is something that’s been on their radar for quite some time, obviously though something must of happened during last week to prompt them into doing the sudden unannounced change when they did on Friday.

For example – a 13p @ 1.06 back bet is ‘unfair’ as it ‘ought’ to win 0.78p, but actually – due to the old rounding – wins 1p, which is a 28% uplift in profit.

However having hundreds and thousands of tiny bets like that hitting the exchange from various accounts purposely exploiting this loophole is bad for API stability which effects us all so its not a bad thing Betfair have taken decision to close this exploit once and for all.

What we did

Although no one was aware of this change coming, we spotted something was wrong within hours and moved quickly to release an updated build of Bet Angel later that same evening to our forum to try and reduce the wider impact these new changes were having on customers using stakes below the £2 Betfair minimum, particularly when greening up with small stakes. This enabled Bet Angel users to continue using the software and their trading throughout that weekend.

Once we were able to speak with Betfair and get clear confirmation of what exactly what it was they changed and what the new parameters and calculations now being used were we could then issue another build of this Bet Angel at the start of this week with tighter coding.

Updating Bet Angel

We recommend updating Bet Angel. These updated versions will still allow you to continue to place bets and green up with small stakes still. But due to the new Betfair rounding rules, there may be times when your P/L still ends up uneven by a few pence. So we have also updated the Bet Angel logging to spot when the API rejects these bets due to rounding, this allows users to see clearly if that was indeed the reason their order was rejected or not.

If that does happen you will see an error written to your Bet Angel log which looks like ” While Greening Up Unable to Place Lay Bet Due to Befair’s Rules Regarding Payout/Liability Rounding”

The latest builds of Bet Angel are now;

Bet Angel Profesional V1.52c

Bet Angel Trader V1.4.4c

These can be downloaded from both our forum and main website, once installed you will see one of those build numbers in the bottom right corner of the blue login window or by clicking the ‘about’ tab once logged in.

If you are installing the latest version of Bet Angel to a VPS you may need to follow the specific instructions listed on this blog post.

Note; If you are not using the latest version, you will also see a pop-up message at login prompting you to download and install the latest version.

For full details of the changes made by Betfair on 19th June please see this post from their developer’s forum

1 Comment
  1. James 4 years ago
    Reply

    The change is understandable, but Betfair’s total silence shows their new customer service.

    They quite simply hate traders and seem to just about tolerate having an exchange.

    Maybe they should just kill it.

Leave a Comment

Your email address will not be published.


The reCAPTCHA verification period has expired. Please reload the page.