Bet Angel V1.54.2 - Greening Fix from API Issues

Post Reply
phrenetic
Posts: 45
Joined: Sun Oct 16, 2016 5:11 pm

The issue appears to affect both back and lay bets.

Betfair have posted the following explanation to their developer forum:

We made an emergency release earlier today to prevent consistent attempts to take advantage of bet rounding.

Any bets that are placed to benefit from rounding will now be rejected with the error INVALID_PROFIT_RATIO

Please see further information and example below:

If customers attempt to place a bet (including a bet used a size-up edit or price change) or cancel a bet down to a remaining size, such that it returns 20% less or 25% more [1] than it ‘ought’ to, that bet will fail with an INVALID_PROFIT_RATIO error returned to API customers – (customers attempting such on the Betfair website or mobile app will receive a generic error).

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

So attempting to:

• Increase the size of a £2.00 bet @ 1.06 to £2.13 (which creates a new 13p bet @ 1.06)
• Cancel £1.83 of a £2.00 bet @ 1.06 (to leave a 13p remainder @ 1.06)
• Price-editing a 13p @ 1000 bet to 13p @ 1.06 (which cancels the bet @ 1000 and creates a new one @ 1.06)

Will all fail with the error above.

Apologies for the lack of notice regarding this urgent release.

Betfair Developer Program


So, the issue appears to be a bit more sophisticated than it first appeared.
User avatar
Euler
Posts: 24799
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ

We had a more detailed conversation with Betfair yesterday, so are working at an optimal solution today.
phrenetic
Posts: 45
Joined: Sun Oct 16, 2016 5:11 pm

Not sure I understand the bit that says "20% less" - does that mean that they reject bets that would have benefited Betfair (i.e. a bet where the user gets 1p profit but the calculated profit was 1.20p or higher)?

For example, placing a back bet for 12p at odds of 1.11
Bet Angel
Bet Angel
Bet Angel
Posts: 4001
Joined: Tue Apr 14, 2009 3:47 pm

phrenetic wrote:
Mon Jun 22, 2020 12:52 pm
Not sure I understand the bit that says "20% less" - does that mean that they reject bets that would have benefited Betfair (i.e. a bet where the user gets 1p profit but the calculated profit was 1.20p or higher)?

For example, placing a back bet for 12p at odds of 1.11
Correct, that would be rejected. It's not that they are trying to bias the rounding to their own benefit, they are just trying to reduce the margin available to people abusing it to discourage it.
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Getting a few issues with this today. Basically trying to green up in play is causing lay bets to be raised at very prices low instead of the price requested.

So I clicked to green up in play at approx 3.00 for a small profit of less than £2 and I actually got a lay bet placed at 1.03.
When placing a bet it should be rejected outright if it breaches Betfair's limits in some way, not be commuted to placing a bet at completely different odds to what were requested.

Also it is common to iterate several green up processes in play because the odds are bouncing around so much so ultimately small bets become quite normal, not some attempt to do Betfair out of commission. WIll have to avoid in-play for a while until this stabilises and we actually know what we are dealing with. I also noticed that the early markets for Sunday had pretty much nothing matched over 24 hours after the markets were opened and I assumed this was something to do with the low value stakes etc.
Bet Angel
Bet Angel
Bet Angel
Posts: 4001
Joined: Tue Apr 14, 2009 3:47 pm

Wolf1877 wrote:
Mon Jun 22, 2020 2:19 pm
So I clicked to green up in play at approx 3.00 for a small profit of less than £2 and I actually got a lay bet placed at 1.03.
It'll be using the 1.03 price to create the under £2 bet necessary for your green-up. It's always worked like that apart from the fact it used to always do that at 1.01. With these new rules, we have to adjust the low price, however that it just temporary while it gets the required stake and then moves up to the exit price you requested.
Please confirm that you are using version 1.54.2b as it's only the b build that will pick the correct 'low' price each time - at least it's worked in all our tests so far.
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Bet Angel wrote:
Mon Jun 22, 2020 2:45 pm
Please confirm that you are using version 1.54.2b as it's only the b build that will pick the correct 'low' price each time
I was using 1.54.2 downloaded and installed on Saturday morning - not the b version which I hadnt even noticed had been released.
User avatar
speedyhamster
Posts: 119
Joined: Fri Sep 22, 2017 9:58 am

Euler wrote:
Mon Jun 22, 2020 12:18 pm
We had a more detailed conversation with Betfair yesterday, so are working at an optimal solution today.
Does this mean there will be a 1.54.2c version released shortly?
Bet Angel
Bet Angel
Bet Angel
Posts: 4001
Joined: Tue Apr 14, 2009 3:47 pm

speedyhamster wrote:
Mon Jun 22, 2020 5:32 pm
Does this mean there will be a 1.54,2c version released shortly?
Yes, that's just been uploaded... same download links as before as there isn't much difference between these builds.
The 'c' build handles a few more edge cases now that we know the calculations that betfair was using, but it still plays it safe when a bet has a chance of being rejected. The last thing we want to risk is a full market green-up failing just because one bet needs a 1p adjustment!
This build also has better error reporting when the API rejects a bet due to rounding, so it's more obvious when looking in the Log.

If you're running the 'b' build then yes this is slightly better, but there's no urgency to use this version. We'll be encouraging everyone using older versions to upgrade.
User avatar
speedyhamster
Posts: 119
Joined: Fri Sep 22, 2017 9:58 am

Bet Angel wrote:
Mon Jun 22, 2020 5:43 pm
speedyhamster wrote:
Mon Jun 22, 2020 5:32 pm
Does this mean there will be a 1.54,2c version released shortly?
Yes, that's just been uploaded... same download links as before as there isn't much difference between these builds.
The 'c' build handles a few more edge cases now that we know the calculations that betfair was using, but it still plays it safe when a bet has a chance of being rejected. The last thing we want to risk is a full market green-up failing just because one bet needs a 1p adjustment!
This build also has better error reporting when the API rejects a bet due to rounding, so it's more obvious when looking in the Log.

If you're running the 'b' build then yes this is slightly better, but there's no urgency to use this version. We'll be encouraging everyone using older versions to upgrade.
thx i will try and download later as it still seams to be the b build being downloaded
db250
Posts: 3
Joined: Fri Jun 19, 2020 5:33 pm

I am running 1.54.2c, and it seems that the rounding issue is back when trying to green up.

I got the following message when trying this morning

" While Greening Up. unable to place £0.02 Lay bet at 1.7 on 6. Brooklyns Best due to befair's rules regarding payout/liability rounding"

Does this mean something has changed again? as i could green up on small stakes last night?

BTW I can cash out in Betfair which is a work around but not ideal.

Any advice on any settings to change etc gratefully received or is it just it it out and wait?

Thanks
Bet Angel
Bet Angel
Bet Angel
Posts: 4001
Joined: Tue Apr 14, 2009 3:47 pm

db250 wrote:
Tue Jun 23, 2020 9:50 am
" While Greening Up. unable to place £0.02 Lay bet at 1.7 on 6. Brooklyns Best due to befair's rules regarding payout/liability rounding"
Like the message says, that bet does not meet their new rules regarding rounding. That bet would cause them to have to round the liability by 28% which exceeds their threshold. 1.7 is one of the prices where neither a 1p or 2p bet would be allowed due to the excessive rounding. P&Ls are just going to be a few pence more uneven from now onwards.
db250 wrote:
Tue Jun 23, 2020 9:50 am
BTW I can cash out in Betfair which is a work around but not ideal.
The cash out calculations are very inefficient compared to greening, so although adopting that model may have allowed you to move 1p around in the P&L in this case, if you were to adopt that method long term you'd lose a lot more pennies in total over time! Best to just ignore the message from now, it'll green what it can and just make a note of the others in the log. The rejection of one tiny adjustment bet does not prevent the rest of the green up process from working, so no risk of your P&L being wildly out.
db250
Posts: 3
Joined: Fri Jun 19, 2020 5:33 pm

Ok thanks, I will read more into it.
User avatar
gstar1975
Posts: 619
Joined: Thu Nov 24, 2011 11:59 am

I wonder if other Exchanges will follow suite? Or can people still take advantage of this loophole? :twisted:
Long Term
Posts: 17
Joined: Wed Oct 11, 2017 6:19 pm

Version: 1.54.2 c

The prices seem a bit clunky/slower when refreshing?
I am using 20ms refresh and have the tuner as per normal, am I missing something?
or is this the new normal.
Post Reply

Return to “Bet Angel - Release & version history”