Automation - recording the stake, liability and odds of a lay bet

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Drhouse31
Posts: 3
Joined: Wed May 08, 2013 9:00 am

Hi all,

I’m hoping someone can point me in the right direction.

When placing a lay bet via automation, I want to store the stake, liability, and odds of that bet as stored values for the selection. I’ve tried using the “Matched Bet Information of a Selection” option in my lay bet rule, but I’m not sure if that actually gives me the correct values.

Is there a straightforward way to capture these values that I might be overlooking? Any guidance would be much appreciated.
User avatar
jamesedwards
Posts: 4305
Joined: Wed Nov 21, 2018 6:16 pm

Drhouse31 wrote:
Thu Aug 28, 2025 9:33 am
Hi all,

I’m hoping someone can point me in the right direction.

When placing a lay bet via automation, I want to store the stake, liability, and odds of that bet as stored values for the selection. I’ve tried using the “Matched Bet Information of a Selection” option in my lay bet rule, but I’m not sure if that actually gives me the correct values.

Is there a straightforward way to capture these values that I might be overlooking? Any guidance would be much appreciated.
The problem is likely due to Bet Angel moving quicker than the bet landing in the exchange. It takes about 0.1 seconds for the Betfair to manage your request and report the info back to Bet Angel. And if youre betting in-play then you need to add the relevant market delay too.

Try adding a gap to the value of betting delay + 0.2 sec between the bet trigger and the value storing.
User avatar
jamesedwards
Posts: 4305
Joined: Wed Nov 21, 2018 6:16 pm

Try adding these two lines to your rulefile. This should store the info your require for every new matched bet as soon as Bet Angel registered it's matched status. You might have to fiddle with the refresh rates and the condition timings depending on how fast your market is refreshing.
test 25.baf
You do not have the required permissions to view the files attached to this post.
Drhouse31
Posts: 3
Joined: Wed May 08, 2013 9:00 am

Thanks for the assistance. That must be why I was previously getting strange results.

What I've done now is used a signal to indicate once the lay bet is placed. The condition will now only fire once that signal has flagged, and it seems to be reflecting the correct information now.

Thanks so much for your help.
Post Reply

Return to “Bet Angel - Automation”