Bet Angel V1.54.2 - Greening Fix from API Issues
Using the b version and just had my first rejection at a lower price with a lower value.
This is log
21/06/2020 20:29:46: Unable to place lay bet on Galatasaray at 1.08. Initial bet - That is not a valid price for this market.
21/06/2020 20:29:46: Exception: Key cannot be null.
Parameter name: key
Was a pennies (14p) laying at fixed stake
This is log
21/06/2020 20:29:46: Unable to place lay bet on Galatasaray at 1.08. Initial bet - That is not a valid price for this market.
21/06/2020 20:29:46: Exception: Key cannot be null.
Parameter name: key
Was a pennies (14p) laying at fixed stake
You do not have the required permissions to view the files attached to this post.
We’re going to improve the error messaging this week, but the liability limits will remain the same.
Laying pennies on a very low priced selection will create a liability of <2p and the rounding is so significant on that compared to the stake, that it’s exactly the type of bet that betfair want to prevent.
For example someone laying £1.49 at 1.01 would cost them 1p whereas it should cost 1.49p based on the price, but they’ll still gain the £1.49 the one in a hundred times that 1.01 loses. Not surprised betfair want to stop that, and hundreds of tiny bets hitting the exchange from various accounts is bad for API stability which hurts us all.
Laying pennies on a very low priced selection will create a liability of <2p and the rounding is so significant on that compared to the stake, that it’s exactly the type of bet that betfair want to prevent.
For example someone laying £1.49 at 1.01 would cost them 1p whereas it should cost 1.49p based on the price, but they’ll still gain the £1.49 the one in a hundred times that 1.01 loses. Not surprised betfair want to stop that, and hundreds of tiny bets hitting the exchange from various accounts is bad for API stability which hurts us all.
- speedyhamster
- Posts: 119
- Joined: Fri Sep 22, 2017 9:58 am
What a farce all Betfair needed to do is change everybody's account to 4 decimal places(only show 2 pl;aces on account) so a 1.49p liability would show as £0.0149 internally so in the long term you don't gain any rounding. So lots of small bets hitting the market would be a waste of time?
That is a good idea, if it doesn't involve rewriting a lot of code. But I'm glad Betfair are trying to do something to stop these penny-shaving scumbags.speedyhamster wrote: ↑Mon Jun 22, 2020 2:06 amWhat a farce all Betfair needed to do is change everybody's account to 4 decimal places(only show 2 pl;aces on account) so a 1.49p liability would show as £0.0149 internally so in the long term you don't gain any rounding. So lots of small bets hitting the market would be a waste of time?
I'd much rather they gave you a limit (like turnover charge) of how many sub 10 pence bets you place on one market and charge you for exceeding the limit. Then you simply green-up on all selections before the off, if desired.
A lot depends on the actual stake and price being used when hedging, but any lay bet with a liability of 2p or more seems to be ok, so you'll be able to hedge profits to be very close to each other.
Thanks. We're used to seeing minor discrepancies with small profits due to rounding and if that dicrepancy is a little bigger in future then so be it - but I'm more concerned that we'll find ourselves unable to hedge at all in some circumstances. Many automation files for instance use even stakes to back and lay many times and possibly multiple runners and then hedge just before the off - it would be worrying if only some things got hedged.
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.
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.
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
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.phrenetic wrote: ↑Mon Jun 22, 2020 12:52 pmNot 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
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.
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.