Hi, this seems like a really basic thing but I just can't spot the API call to do it. How can you get a list of, for example, today's football markets ?
Having got a list, I can then use the addMarkets API call and others and off we go, but I can't see any way to get the initial list of markets, i.e. find the martketIds and other data.
To be clear, I don't mean getting the list that are already selected (i.e getMarkets), but getting a list of ones that I might want to use addMarkets to select.
Cheers, Chris
Getting a list of markets from betfair
Have you considered getting Bet Angel to do the heavy lifting for you, while you focus on the strategy?
https://www.betangel.com/api-guide/
https://www.betangel.com/api-guide/
Use applycoupon end point and then supply name of a coupon in BA thats setup for todays matches
JSON request would be something like the following
{"couponName":"football","clearOption":"DONT_CLEAR","watchListNumber":1}
you can then use getMarkets to fetch all of the IDs
JSON request would be something like the following
{"couponName":"football","clearOption":"DONT_CLEAR","watchListNumber":1}
you can then use getMarkets to fetch all of the IDs
-
- Posts: 16
- Joined: Sat Jan 04, 2025 1:53 pm
Hi, thanks - I've been searching the very API definition you provide the link to, plus this forum and with general internet searches but this specific thing seems to be missing from the API, perhaps intentionally so, and I need to use the Betfair API direct to get the initial market definitions.
The chap I'm working with is the strategy guy so that's his department. I'm the techy bloke, and right now I'm evaluating what BetAngel can/can't do in comparison to just going direct with the Betfair API.
The intention has always been to do the heavy lifting ourselves, it's more a case of whether to do that via BetAngel or not, and what we want to do strategy-wise is beyond what BetAngel can do with rules and stored values etc.
We really like the BetAngel UI, it's great for the strategy chap to try things out manually, and I suspect it will save me a good bit of time over 'going direct' to the Betfair API; so it'd be a shame if I need to use it anyway, just for this one thing !
The plan is to define a set of base strategies in our own database, have our code selecting markets and what strategies to apply to them, then actuating that through BetAngel, storing the results in the database to then feed them into a machine learning-ish model and so refine new versions of the strategies and repeat. I'm already doing something similar in a different sphere, and this seems an ideal arena to apply it to.
The chap I'm working with is the strategy guy so that's his department. I'm the techy bloke, and right now I'm evaluating what BetAngel can/can't do in comparison to just going direct with the Betfair API.
The intention has always been to do the heavy lifting ourselves, it's more a case of whether to do that via BetAngel or not, and what we want to do strategy-wise is beyond what BetAngel can do with rules and stored values etc.
We really like the BetAngel UI, it's great for the strategy chap to try things out manually, and I suspect it will save me a good bit of time over 'going direct' to the Betfair API; so it'd be a shame if I need to use it anyway, just for this one thing !
The plan is to define a set of base strategies in our own database, have our code selecting markets and what strategies to apply to them, then actuating that through BetAngel, storing the results in the database to then feed them into a machine learning-ish model and so refine new versions of the strategies and repeat. I'm already doing something similar in a different sphere, and this seems an ideal arena to apply it to.
-
- Posts: 16
- Joined: Sat Jan 04, 2025 1:53 pm
Oh, brilliant thanks - I was rather looking for something called oh, I dunno - 'searchMarkets' or listMarkets' but that interface looks like it does just what I'm after, thanks !!ODPaul82 wrote: ↑Sun Jan 05, 2025 8:47 amUse applycoupon end point and then supply name of a coupon in BA thats setup for todays matches
JSON request would be something like the following
{"couponName":"football","clearOption":"DONT_CLEAR","watchListNumber":1}
you can then use getMarkets to fetch all of the IDs
I did spot some interfaces with 'coupon' in the name while browsing the API definitions but have ignored them so far thinking "we don't have any coupons to use"
