Get Football Market using team names

The Bet Angel API makes it easy for you to further enhance your betting and trading by integrating your own code into Bet Angel
Post Reply
User avatar
sibur
Posts: 117
Joined: Tue Jan 11, 2022 11:07 pm

I would like to use the API to add a specific football market to Guardian. Using addMarkets allows you to specify an market ID
http://localhost:9002/api/guardian/v1.0/addMarkets

but how do i find the ID - I would like to specify the home and away team to be able to locate the ID

The only way I can think is to add all the soccer markets and then work through each one removing them if they don't match.
Is there a better way?
User avatar
jamesedwards
Posts: 5018
Joined: Wed Nov 21, 2018 6:16 pm

sibur wrote:
Thu Dec 04, 2025 6:24 pm
I would like to use the API to add a specific football market to Guardian. Using addMarkets allows you to specify an market ID
http://localhost:9002/api/guardian/v1.0/addMarkets

but how do i find the ID - I would like to specify the home and away team to be able to locate the ID

The only way I can think is to add all the soccer markets and then work through each one removing them if they don't match.
Is there a better way?
Not API, but you can just drop a list of team names into the Guardian market selection tool, and from there you can extract the market ID if you need it.
sniffer66
Posts: 1845
Joined: Thu May 02, 2019 8:37 am

sibur wrote:
Thu Dec 04, 2025 6:24 pm
I would like to use the API to add a specific football market to Guardian. Using addMarkets allows you to specify an market ID
http://localhost:9002/api/guardian/v1.0/addMarkets

but how do i find the ID - I would like to specify the home and away team to be able to locate the ID

The only way I can think is to add all the soccer markets and then work through each one removing them if they don't match.
Is there a better way?
The only workaround I can think of off the top of my head is to use the API to load a coupon with ALL your possible markets. Then use a
http://localhost:9000/api/markets/v1.0/getMarkets

The response will give you the market name, type and its id once you parse it - matching on the team names. Then do a remove markets with every id you've just retrieved MINUS the one you need.

Bit longwinded but you have to have all the markets loaded into Guardian to retrieve the one you need, unless you can grab it externally. Having said that, it would only take a few secs to run the above

EDIT: Sorry, just back from a long flight and a bit tired , just realised that's pretty much what you went for as a workaround - that's the only way I can think to do it as well
sniffer66
Posts: 1845
Joined: Thu May 02, 2019 8:37 am

The only other way I can think to do it is find\scrape the URL for the event\market on the BF website

https://www.betfair.com/exchange/plus/e ... g-34991421

https://www.betfair.com/exchange/plus/f ... .250917550

These are the ones for the event\CS market for Gladbach vs Mainz. That contains the event id\market id at the end - which you could pass to your request payload
User avatar
MemphisFlash
Posts: 2345
Joined: Fri May 16, 2014 10:12 pm

You could just use a text comparison rule with a list of the teams you constantly want to trade.
Why make it difficult.
sniffer66
Posts: 1845
Joined: Thu May 02, 2019 8:37 am

MemphisFlash wrote:
Fri Dec 05, 2025 9:34 am
You could just use a text comparison rule with a list of the teams you constantly want to trade.
Why make it difficult.
Because this is using the API and not Guardian . It's a bit more convoluted if you want one specific market loaded
User avatar
sibur
Posts: 117
Joined: Tue Jan 11, 2022 11:07 pm

Yes, many thanks for your replies.

I get the matches on a feed that I am scraping off a website.

I had hoped there might be a search function but as has already been said, it's easier to load all the matches into guardian and use the API to remove the ones I'm not interested in.

Thanks again.
sniffer66
Posts: 1845
Joined: Thu May 02, 2019 8:37 am

sibur wrote:
Fri Dec 05, 2025 12:17 pm
Yes, many thanks for your replies.

I get the matches on a feed that I am scraping off a website.

I had hoped there might be a search function but as has already been said, it's easier to load all the matches into guardian and use the API to remove the ones I'm not interested in.

Thanks again.

Out of curiosity, how are you dealing with slight differences in team names between sites ? I have a combo of a lookup table - Man Utd = Manchester United, fuzzy matching and start times etc but still get the odd error - which can be costly
User avatar
sibur
Posts: 117
Joined: Tue Jan 11, 2022 11:07 pm

Yup, this is a problem for me. I am using fuzzy logic too to handle this and have been looking at this today. Used Claude AI to give me some fresh ideas. One gotcha was Sporting Lisbon. In Portugal they are know as Sporting CP. I will find out for sure when its all finished and I'm sure there will be exceptions, even after filtering, that fall through the net.
Post Reply

Return to “Bet Angel - API”