Auto Loading Markets and Rules
- firlandsfarm
- Posts: 3303
- Joined: Sat May 03, 2014 8:20 am
Hi all, is there a way to automatically ID new Bf markets within specific sports as they are posted, apply them to Guardian and attach one or more Rule Sets to those markets? I expect it will have something to do with the BA API but I have never used that yet!
- jamesedwards
- Posts: 3915
- Joined: Wed Nov 21, 2018 6:16 pm
It's the sign of an experienced trader when you get here.firlandsfarm wrote: ↑Wed Jun 11, 2025 7:48 amHi all, is there a way to automatically ID new Bf markets within specific sports as they are posted, apply them to Guardian and attach one or more Rule Sets to those markets? I expect it will have something to do with the BA API but I have never used that yet!

It can probably be done in the API but to do it in Guardian you need to use some sort of macro workaround.
It's quite easily done in the API. I have Python code to do it (each sport has it's own EVENT_TYPE_ID). You can happily load multiple coupons, apply different rules to sports or market types, based on strings in the market name. You can even run on a timed loop\schedule so it's 100% hands free.jamesedwards wrote: ↑Wed Jun 11, 2025 9:53 amIt's the sign of an experienced trader when you get here.firlandsfarm wrote: ↑Wed Jun 11, 2025 7:48 amHi all, is there a way to automatically ID new Bf markets within specific sports as they are posted, apply them to Guardian and attach one or more Rule Sets to those markets? I expect it will have something to do with the BA API but I have never used that yet!![]()
It can probably be done in the API but to do it in Guardian you need to use some sort of macro workaround.
Happy to post up code snippets if it helps
A quick workaround is to use auto-hot keys to trigger a keystroke at a certain time of the day.
That keystroke can automatically update the markets.
We realise this is a pain, but Betfair explicitly told us not to let customers auto update markets automatically directly from Bet Angel.
That keystroke can automatically update the markets.
We realise this is a pain, but Betfair explicitly told us not to let customers auto update markets automatically directly from Bet Angel.
- ShaunWhite
- Posts: 10353
- Joined: Sat Sep 03, 2016 3:42 am
What did they say when you asked why you can't?
Is it a safeguarding reason, because refreshing every 30m definately isn't an IT problem.
- ShaunWhite
- Posts: 10353
- Joined: Sat Sep 03, 2016 3:42 am
The full market tree would be a problem admittedly and a design error, but interest in mixed double table tennis is limitted so it probably wouldn't need to be it all.
You could handle it by allowing users to subscribe to a limitted number of specific sports, eg like on the quick pick for choosing horses and/or dogs. Then refresh just those every hour or 30mins (not constantly) for almost no sever stress. That's how my system does it anyway, via optimising the market types on the connection subscriptions. It's how Betfair recommend you handle it too.
But its priorities I suppose, mine is fully automated rather than semi automated because I don't want to attend to it every day. But to be fully automated you need rules to define which new markets get chosen for which strategies and it's all probably OTT for most people. I can see why you're not keen to find a way to implement autorefresh properly, it's quite a big spend.