Smarkets / Betfair linking

Post Reply
armadillo
Posts: 21
Joined: Sat Nov 16, 2013 10:04 pm

I've written a piece of software for personal use which keeps a directory of prices allowing me to find arbs, etc. This uses both Betfair's API and Smarkets price feed. Something I really want to do is to be able to quickly see which exchange has the best price and/or liquidity and quickly get an order in.

A problem I've faced is that Smarkets have different team names so programatically, how do you tell that "Blau-Weiß Linz" and "BW Linz" are the same? So far I've tried to just make a list but maintaining it is a never ending task. Also the names occasionally change.

Anyone found a reliable way of doing this with minimal maintenance?

I've asked Smarkets since they (or their traders) usually peg against Betfair but got no response.
User avatar
Euler
Posts: 24700
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ

Would have thought the only way is to create a master list. I don't use smarkets so not familiar with how stable their names are but Betfair are very consistent.
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

i used to do a similar thing with betfair/betdaq and created a dictionary type lookup using the betfair market id as the key (then iterate round the betfair structure using the dictionary value from the marketid key to grab the smarket data async or otherwise). the main problem to solve will be the different event descriptions, especially so in football where there seems to be almost global disagreement on what the team abbreviation/shortname should be. horse racing isn't so bad as you only really have different course names to worry about (wolverhampton/w'hampton etc) and 99% of the time can even match almost purely on the event time (when taking country code into consideration).

in a word, you'll find exceptions but if you log them, you can either manually add the exception to a database table or some json structure and eventually you'll end up with a pretty efficient x-ref system that will be adaptable across different platforms (betdaq, matchbook, smarkets etc).
Jukebox
Posts: 1576
Joined: Thu Sep 06, 2012 8:07 pm

This may or may not be helpful but just in case it is:

Betfair allocate a unique 'runner id' to each team - they quote it in a column in their exchange data records so you could go back through the records to build up your list - that same runner ID also comes through the API and can be seen in the hidden column A in the Bet Angel Spreadsheet.

Come on 1096 !
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

Like Jukebox says every runner has it's own unique selectionId number and I'd imagine smarkets do the same. Maybe you'll just have to maintain a database and match the Id's rather than names. For racing/dogs etc you could just as easily use the saddlecloth numbers. Maybe just set up automation to flag up any discrepancies so you can match them up manually and have the matches just store direct to the database.

Maybe you could email them and ask for a list of current selectionId's the BDP side of Betfair is usually very helpful
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

Home/Away/Draw combined with start time.
armadillo
Posts: 21
Joined: Sat Nov 16, 2013 10:04 pm

Thanks all, I did try the dictionary thing but just adding a bit at a time. I think I have maybe 75% coverage but probably need to just get on with figuring out what's remaining.
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

Why take the risk of trying to match names when you can go off home/away/draw?
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

LinusP wrote:
Wed Jul 12, 2017 2:37 pm
Why take the risk of trying to match names when you can go off home/away/draw?
There could be hundreds of games on a Saturday with similar home/away/draw prices all kicking off at the same time. At the end of the day the only reliable way of getting the correct match is by using the team names as defined by each operator. Both have Api's so I can't see it being that big a problem to compile your own name/id 'match' list, the BDP team will probably send you a list of football team names and selectionIds if you ask. Smarkets probably won't but have an xml feed so shouldn't take too log to gather them all.
armadillo
Posts: 21
Joined: Sat Nov 16, 2013 10:04 pm

LinusP wrote:
Wed Jul 12, 2017 2:37 pm
Why take the risk of trying to match names when you can go off home/away/draw?
Not too sure what you're suggesting to be honest.
armadillo
Posts: 21
Joined: Sat Nov 16, 2013 10:04 pm

Euler wrote:
Thu Jun 22, 2017 8:35 pm
Would have thought the only way is to create a master list. I don't use smarkets so not familiar with how stable their names are but Betfair are very consistent.
Here's an example of Betfair's consistency:

https://www.betfair.com/exchange/plus/f ... .132488326 - Bayern Munich v Bayer Leverkusen
https://www.betfair.com/exchange/plus/f ... .133297336 - Leverkusen v Hoffenheim

Same team, two different IDs. This makes it difficult to link up the first game because another source has a single Leverkusen who of course aren't playing B Munich according to Betfair!

Also, there's a "Leicester" and "Leicester City" both in the EPL, anyone know when the Leicester derby is?

https://www.betfair.com/exchange/footba ... d=28271453
https://www.betfair.com/exchange/footba ... d=28345059
Bluesky
Posts: 420
Joined: Mon Sep 19, 2016 9:26 pm

armadillo wrote:
Thu Aug 17, 2017 11:43 pm
Also, there's a "Leicester" and "Leicester City" both in the EPL, anyone know when the Leicester derby is?
September the 31st I think :lol:
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

following on from this question, which ironically, i supplied an answer for...

previously, i've been using supplied Betfair football team names and where exceptions were found in matching names (with another 3rd party API) i would add the entries to a dictionary xref. However, I am now faced with a task that is of a slightly different order. I have to locate football fixtures based on team names supplied by pinnacle and xref them against their betfair names. going this way round seems like it should pose no issue. however, many, many team names are different and i'm going to create a json structure to match team names that vary (and skip where they match).

Does anyone know of an api call on betfair (api-ng) to bring back a list of team names either as a single hit or otherwise by country code??

I did see SB mention contacting BDP and i have also explored this avenue (am awaiting a response). But if someone in the interim has such a list (even if in excel), this would be most welcome..
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

jimibt wrote:
Tue Dec 18, 2018 8:39 am
following on from this question, which ironically, i supplied an answer for...

previously, i've been using supplied Betfair football team names and where exceptions were found in matching names (with another 3rd party API) i would add the entries to a dictionary xref. However, I am now faced with a task that is of a slightly different order. I have to locate football fixtures based on team names supplied by pinnacle and xref them against their betfair names. going this way round seems like it should pose no issue. however, many, many team names are different and i'm going to create a json structure to match team names that vary (and skip where they match).

Does anyone know of an api call on betfair (api-ng) to bring back a list of team names either as a single hit or otherwise by country code??

I did see SB mention contacting BDP and i have also explored this avenue (am awaiting a response). But if someone in the interim has such a list (even if in excel), this would be most welcome..
Morning, there is a guy on my slack group called seaders who would be able to answer this question, feel free to join as I am sure he would be more than happy to respond.

https://betfairlightweight.herokuapp.com/

Sorry to divert but he isn’t a member of this forum.
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

LinusP wrote:
Tue Dec 18, 2018 10:53 am
jimibt wrote:
Tue Dec 18, 2018 8:39 am
following on from this question, which ironically, i supplied an answer for...

previously, i've been using supplied Betfair football team names and where exceptions were found in matching names (with another 3rd party API) i would add the entries to a dictionary xref. However, I am now faced with a task that is of a slightly different order. I have to locate football fixtures based on team names supplied by pinnacle and xref them against their betfair names. going this way round seems like it should pose no issue. however, many, many team names are different and i'm going to create a json structure to match team names that vary (and skip where they match).

Does anyone know of an api call on betfair (api-ng) to bring back a list of team names either as a single hit or otherwise by country code??

I did see SB mention contacting BDP and i have also explored this avenue (am awaiting a response). But if someone in the interim has such a list (even if in excel), this would be most welcome..
Morning, there is a guy on my slack group called seaders who would be able to answer this question, feel free to join as I am sure he would be more than happy to respond.

https://betfairlightweight.herokuapp.com/

Sorry to divert but he isn’t a member of this forum.
thanks Liam -i'll join up today and see where it takes us. thanks for the info...

[edit] - done, joined and dm'ing with seaders right now - tnx!
Post Reply

Return to “Alternative betting exchanges, Smarkets, Matchbook etc.”