Is it possible to check conditions IN-BETWEEN placing an order on the ladder, and it executing?

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
eightbo
Posts: 2263
Joined: Sun May 17, 2015 8:19 pm

I want to be able to define a specific exposure for individual markets
e.g. -£100 on Newmarket 17:00 and -£500 on all Premier League Games

I should be able to track and update the remaining exposure for the market as a Stored Value,
...but is it possible to check against that SV before actually executing the order?

For example if I apply automation to Newmarket defining -£100 exposure, then place 3x £40 bets on runner A, I want only 2x bets to successfully go through, and the third bet to never reach the market.

Does anyone know if this kind of check between order being placed on ladder and actual execution is possible? Perhaps with a Servant?
User avatar
jamesedwards
Posts: 4258
Joined: Wed Nov 21, 2018 6:16 pm

eightbo wrote:
Tue Jan 21, 2025 10:25 pm
I want to be able to define a specific exposure for individual markets
e.g. -£100 on Newmarket 17:00 and -£500 on all Premier League Games

I should be able to track and update the remaining exposure for the market as a Stored Value,
...but is it possible to check against that SV before actually executing the order?

For example if I apply automation to Newmarket defining -£100 exposure, then place 3x £40 bets on runner A, I want only 2x bets to successfully go through, and the third bet to never reach the market.

Does anyone know if this kind of check between order being placed on ladder and actual execution is possible? Perhaps with a Servant?
If you mean to stop Bet Angel triggering then you could use stored values set at market or event level for the racing, and Bet Angel level for the Premier League, that tot up stakes as they are triggered and prevent further triggers once a sum is reached.

If you mean to prevent a bet from hitting the market after it's been triggered by Bet Angel then it can't be done. Years ago there was a Betfair glitch where you could force a triggered bet to fail when it hit the market by reducing your available balance in-between, but that was sewn up long ago.
eightbo
Posts: 2263
Joined: Sun May 17, 2015 8:19 pm

jamesedwards wrote:
Wed Jan 22, 2025 12:10 am
If you mean to prevent a bet from hitting the market after it's been triggered by Bet Angel then it can't be done
I want to check locally against SV before firing the bet e.g.
1) submit potential bet order (click on ladder)
2) check requested bet amount wouldn't exceed a stored value
...then either:
3A) [not exceeded] execute bet order
3B) [exceeded] don't execute bet order (play a sound / print to log instead)

Betfair only provide a global exposure limit but I want to control max risk per market
Usually you could reduce balance before trading but my bots in other markets need active access to higher bankroll, so that doesn't work either.
Really I could do with another acc but they won't give me one yet so a bit stuck atm what to do
Anbell
Posts: 2401
Joined: Fri Apr 05, 2019 2:31 am

eightbo wrote:
Wed Jan 22, 2025 1:53 am
jamesedwards wrote:
Wed Jan 22, 2025 12:10 am
If you mean to prevent a bet from hitting the market after it's been triggered by Bet Angel then it can't be done
I want to check locally against SV before firing the bet e.g.
1) submit potential bet order (click on ladder)
2) check requested bet amount wouldn't exceed a stored value
...then either:
3A) [not exceeded] execute bet order
3B) [exceeded] don't execute bet order (play a sound / print to log instead)

Betfair only provide a global exposure limit but I want to control max risk per market
Usually you could reduce balance before trading but my bots in other markets need active access to higher bankroll, so that doesn't work either.
Really I could do with another acc but they won't give me one yet so a bit stuck atm what to do
Can you get an Australian account?
eightbo
Posts: 2263
Joined: Sun May 17, 2015 8:19 pm

Anbell wrote:
Wed Jan 22, 2025 4:08 am
Can you get an Australian account?
Clever idea ty.  I've not thought of that yet.  Seems like AU accounts can bet IP which was 1 concern I had.
The other being I don't want to risk my main account being closed to prevent owning 2nd acc.
User avatar
jamesedwards
Posts: 4258
Joined: Wed Nov 21, 2018 6:16 pm

eightbo wrote:
Wed Jan 22, 2025 1:53 am
jamesedwards wrote:
Wed Jan 22, 2025 12:10 am
If you mean to prevent a bet from hitting the market after it's been triggered by Bet Angel then it can't be done
I want to check locally against SV before firing the bet e.g.
1) submit potential bet order (click on ladder)
2) check requested bet amount wouldn't exceed a stored value
...then either:
3A) [not exceeded] execute bet order
3B) [exceeded] don't execute bet order (play a sound / print to log instead)

Betfair only provide a global exposure limit but I want to control max risk per market
Usually you could reduce balance before trading but my bots in other markets need active access to higher bankroll, so that doesn't work either.
Really I could do with another acc but they won't give me one yet so a bit stuck atm what to do
Use a condition on that checks 'the net stake of a selection' has to be below X for the trade to trigger.
eightbo
Posts: 2263
Joined: Sun May 17, 2015 8:19 pm

jamesedwards wrote:
Wed Jan 22, 2025 12:51 pm
Use a condition on that checks 'the net stake of a selection' has to be below X for the trade to trigger.
ok thanks, but still wondering if it can be checked after user clicks on price in ladder to bet, but before executing the order
I was thinking no but i'll take a look when I can
User avatar
jamesedwards
Posts: 4258
Joined: Wed Nov 21, 2018 6:16 pm

eightbo wrote:
Wed Jan 22, 2025 1:58 pm
jamesedwards wrote:
Wed Jan 22, 2025 12:51 pm
Use a condition on that checks 'the net stake of a selection' has to be below X for the trade to trigger.
ok thanks, but still wondering if it can be checked after user clicks on price in ladder to bet, but before executing the order
I was thinking no but i'll take a look when I can
Perhaps I am misunderstanding your question?

You cannot stop an order being executed once Bet Angel places an order into Betfair. eg during the Betfair delay period.

You can add a condition in Bet Angel that checks the net stake of a triggered selection before it places an order into Betfair. Therefore you can prevent an order being placed if exposure is already at a predetermined value.
eightbo
Posts: 2263
Joined: Sun May 17, 2015 8:19 pm

jamesedwards wrote:
Wed Jan 22, 2025 2:57 pm
...
You can add a condition in Bet Angel that checks the net stake of a triggered selection before it places an order into Betfair. Therefore you can prevent an order being placed if exposure is already at a predetermined value.
I'm having a go now and seems like I should be able to get it to work. The calculations took me a little while to figure out but basically I'm emulating what Betfair does when it allows the customer to re-use their stake based on available balance / market outcomes.

New to Servants but seems like they don't pass through context of lay/back side ?
e.g. if you click price 6.2 on lay side of ladder it only knows 6.2 price, not if you tried to lay or back (or null e.g. price column)
As a workaround for now I've assigned one servant to handle lay order execution which is activated with Ctrl+Left click, and another to handle back orders (activated with Alt+Left click).

My current problem, however, is I'm still able to click endlessly with normal click to place orders, and the whole point of this servant is to not place orders if it exceeds >£x liability.  Is there some way to disable the regular mouse click on the ladder so I can only place orders using Ctrl+Click / Alt+Click to place bets ? I thought to assign the standard mouse click to an empty servant but I can't seem to find any option to assign it to a servant (only ctrl+mouse click etc.). ...thread for this question in a more appropriate place here.

Any advice or brainstorming appreciated, thank you.
Post Reply

Return to “Bet Angel - Automation”