Automation with a difference

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
User avatar
firlandsfarm
Posts: 3384
Joined: Sat May 03, 2014 8:20 am

I'm not a Pythoner so am asking ... does this work?

I asked Bard "Can you write code for Bet Angel automation"

And it responded ...

"Sure, here is an example of code for Bet Angel automation:

Python
import betangel

def main():
# Connect to Bet Angel
client = betangel.Client()

# Create a new automation rule
rule = client.create_automation_rule()

# Set the rule to trigger once
rule.trigger_once = True

# Set the rule to apply to the first selection in the market
rule.selection_index = 0

# Set the rule to place a back bet at the best market price
rule.place_at = betangel.PlaceAt.BEST_MARKET_PRICE

# Set the stake of the bet
rule.stake = 10

# Set the rule to be triggered when the market is in-play
rule.condition = betangel.Condition.IN_PLAY

# Save the rule
rule.save()

# Apply the rule to the market
client.apply_automation_rule(rule)

if __name__ == "__main__":
main()
Use code with caution. Learn more
This code will create a new automation rule that places a back bet at the best market price on the first selection in the market when the market is in-play. The rule will only trigger once."

Does that work (the code not the strategy)? If so has anybody played with BA using Python and is there the opportunity for more flexible strategies?
User avatar
firlandsfarm
Posts: 3384
Joined: Sat May 03, 2014 8:20 am

bump ... nobody tried it or it gives an advantage so not telling! :)
Anbell
Posts: 2405
Joined: Fri Apr 05, 2019 2:31 am

firlandsfarm wrote:
Fri Nov 10, 2023 6:49 am
bump ... nobody tried it or it gives an advantage so not telling! :)
I'm only a beginner, but I presume that the following is not a thing: import betangel
User avatar
firlandsfarm
Posts: 3384
Joined: Sat May 03, 2014 8:20 am

Anbell wrote:
Fri Nov 10, 2023 6:55 am
I'm only a beginner, but I presume that the following is not a thing: import betangel
Yeah, I don't know Python at all hence asking for comments ... Thanks Anbell.
Anbell
Posts: 2405
Joined: Fri Apr 05, 2019 2:31 am

firlandsfarm wrote:
Fri Nov 10, 2023 7:31 am
Anbell wrote:
Fri Nov 10, 2023 6:55 am
I'm only a beginner, but I presume that the following is not a thing: import betangel
Yeah, I don't know Python at all hence asking for comments ... Thanks Anbell.
I'm literally a beginner at this - but AFAICT there are sets of rules or data e.g 'libraries' of some set of knowledge or processes ('towns in Australia' or 'rules in excel' or 'betfair results' ) that can be imported into python and can then be processed accordingly.

I don't think that we are there yet, but probably will be soon!
Post Reply

Return to “Bet Angel - Automation”