Originally posted by troyedwards8
View Post
MetaData for a race meeting
Collapse
X
-
Hi Troy, just thought I'd throw in my two bob's worth as you have mentioned Australian racing. What I do is extract data (by automated download) from RISA and RacingNSW websites, not too hard to do and then match it up with Betfair Market info.. You might find what you're looking for there.
-
Guest repliedThanks Liam I joined the Slack conversation and had a search through. I think I found that static key on the betfair "nzIFcwyWhrlwYMrh" however I note in reading the info that there is not timeform data for Australian races which is where my main focus is.
Leave a comment:
-
It uses the site key which can be found in the website source, I use regex to pull it out but it hasn’t changed since implementing. It’s a private api so no docs, it’s based off timeform data but from a betfair subdomain.
Feel free to join the slack to ask more questions as there are quite a few of us using it:
https://betfairlightweight.herokuapp.com/
Leave a comment:
-
Guest repliedHi Liam just following up on this thread and I note you talk about using the private API as referenced by your code https://github.com/liampauling/betfa...ts/racecard.pyOriginally posted by LiamP View PostSure Geoff, you can find the endpoint if you open up developer tools on chrome or IE and go to a horse racing market. The endpoint is:
https://www.betfair.com/rest/v2/raceCard
It uses uses an appKey that is stored on the betfair home page which looks to be static which you can find if you open up the source of a betfair page and search for it. The parameters are a bit odd so I recommend having a look at what the site sends.
To access this end pont (https://www.betfair.com/rest/v2/raceCard) do I need to have any other subscription other than my betfair live API key? Ie do I need a TimeForm subscription - i think thats what BF calls it????
Also in my code which I based on the original example VB code my endpoint for betting is "https://api.betfair.com/exchange/betting/json-rpc/v1" To be 100% honest I don't really understand the difference between /json-rpc/ and /rest/. As soon as I got this working I simply moved on
I will have a read through your python code over the next few days however I do find it more difficult to read than VB or C#. Hey is there any other info out there on the input and output classes ?Last edited by Guest; 27-05-2020, 08:37 AM.
Leave a comment:
-
On metadata, what I do is store each entire string with a reference to the runner, rather than try to make a class out of it. As Geoff says if data is missing then it can make a mess of your class, so by storing the entire metadata string and searching for the value when required is the safe way to handle it, I think.. I just pick out the bits my program requires, but it may not exist.
Leave a comment:
-
Hi Troy
IMHO you chose the wrong solution to that problem where the AGE parameter might be missing. I would have left this as a dictionary and just put an if statement to check if AGE is present in the metadata before accessing it. If its not there, nothing you can do, just skip the accessing code.
The metadata is far too unpredictable to make a class out of it. For example "JOCKEY_CLAIM" is only sent for claiming jockeys, its missing for all the others.
I only noticed yesterday but Football can have metadata too, I think it was the "GOALS_LINE" market has 1 or 2 items of metadata for each selection, its nothing useful but it is present. For football your metadata class would not make sense. what would you fill in for Man Utd's "DAM_NAME" ? I could make a few suggestions but I will resist the temptation.
Regards
Leave a comment:
-
Guest repliedOK having played around with the Metadata I note some Metadata is not provided for instance :
ADJUSTED_RATING
OFFICIAL_RATING
FORECASTPRICE_DENOMINATOR
FORECASTPRICE_NUMERATOR
JOCKEY_CLAIM
Any help appreciated
Leave a comment:
-
Guest repliedThanks Geoff, yes I understand the dictionary however was not ideal as it can causes errors. Let me explain …....
my RunnerDescription.vb class was defined below
Metadata() is defined as a dictionary so to access data I would do something like ...Code:[FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Namespace[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] API_NG.TO[/SIZE][/FONT][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]Serializable[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px]()> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Class[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]RunnerDescription[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"selectionId"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] SelectionId() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Long[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"runnerName"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] RunnerName() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]String[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] <[FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"handicap"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] Handicap() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Double[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] <[FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"sortPriority"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] SortPriority() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Integer[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] <[FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"metadata"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] Metadata() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]Dictionary[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px]([/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Of[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]String[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px], [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]String[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px]) [/SIZE][/FONT][/SIZE][/FONT]
However if the JSON returned string does not contain the AGE in the metadata then the above code causes an error! So to fix this I simple changed Metadata from a dictionary string to its own class RunnerMetaData as per below.Code:RunnerAge = MC(0).Runners(0).Metadata("AGE")
Code:[FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"metadata"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] Metadata() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]RunnerMetaData[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
The RunnerMetaData.vb class is
To access the data I now do something like ...….Code:[FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Namespace[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] API_NG.TO[/SIZE][/FONT][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]Serializable[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px]()> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Class[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]RunnerMetaData[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"WEIGHT_UNITS"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] WEIGHT_UNITS() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]String[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#008000][FONT=Consolas][SIZE=10px][COLOR=#008000][FONT=Consolas][SIZE=10px][COLOR=#008000]'pounds[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] <[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF][FONT=Consolas][SIZE=10px][COLOR=#2B91AF]JsonProperty[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px](PropertyName:=[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515][FONT=Consolas][SIZE=10px][COLOR=#A31515]"ADJUSTED_RATING"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px])> [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]Property[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] ADJUSTED_RATING() [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]As[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF][FONT=Consolas][SIZE=10px][COLOR=#0000FF]String[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] [FONT=Consolas][SIZE=10px][FONT=Consolas][SIZE=10px] etc [/SIZE][/FONT][/SIZE][/FONT]
More importantly if AGE was not retuned in the JSON string then no error occurs.Code:RunnerAge = MC(0).Runners(0).Metadata.AGE
Last edited by Guest; 28-08-2019, 01:00 AM.
Leave a comment:
-
Hi
Not sure I fully understand the question but a typical approach is for your RunnerDescription class to have a dictionary for metaData key value pairs E.g.
public Dictionary<string, string> Metadata { get; set; }
This is flexible as it allows Betfair to send as many or as few key value metadata pairs as they like, you just load up your dictionary as they come in
Regards
Leave a comment:
-
Guest repliedJust on RUNNER_METADATA which is returned by listMarketCatalogue for Horse Racing , is there a class defined for RUNNER_METADATA???
for instance the JSON returned for "metadata" is ….
Code:"metadata":{"SIRE_NAME":"Mcardle","CLOTH_NUMBER_ALPHA":"2","OFFICIAL_RATING":null,"COLOURS_DESCRIPTION":"Whi te Tabtouch Logo","COLOURS_FILENAME":"c20190827trots_GLOUCESTERPARK/756045.png","FORECASTPRICE_DENOMINATOR":null,"DAMSIRE_NAME":"Sokys Atom","WEIGHT_VALUE":null,"SEX_TYPE":"G","DAYS_SINCE_LAST_RUN":"4","WEARING":null,"OWNER_NAME":null,"DAM_YEAR_BORN":null,"SIRE_BRED":"USA","JOCKEY_NAME":"Bailey Mcdonough","DAM_BRED":"NZ","ADJUSTED_RATING":null,"runnerId":"5883932","CLOTH_NUMBER":"2","SIRE_YEAR_BORN":null,"TRAINER_NAME":"Cheyenne King-Davies","COLOUR_TYPE":"BR","AGE":"10","DAMSIRE_BRED":"USA","JOCKEY_CLAIM":null,"FORM":"x6708","FORECASTPRICE_NUMERATOR":null,"BRED":"NZ","DAM_NAME":"Laurent Perrier","DAMSIRE_YEAR_BORN":null,"STALL_DRAW":"2","WEIGHT_UNITS":null}
Or do I just need to create my own?
Leave a comment:
-
Of course I meant it this way, and just show what data can be retrieved, without providing exact endpoints, because using anything what is not documented breaches betfair T&C. If you manage to get this data for your own use, as I did myself, it is your problem only, and as I said betfair tolerates such data usage when you are real customer betting on betfair.Originally posted by OzPunter View PostCool it guys, It's not worth squabbling about. Everyone has something to contribute, whether I accept the information or not is my choice. I was prompted to ask the question about track condition because I am having great success in Australian racing by laying the top weighted runners on rain affected tracks, so I was considering making a bot to do the same on UK tracks, but the program would need to know the track condition before placing a bet. That's all, I didn't mean to start WW3.
This is developers forum, so anyone here has some skills and can find solution in reasonable time yourself.
Geof have needs to kick to me without actually checking what information I had provided, so because he did not get anything constructive to your post, I really do not understand why he posted here anything.
Leave a comment:
-
Cool it guys, It's not worth squabbling about. Everyone has something to contribute, whether I accept the information or not is my choice. I was prompted to ask the question about track condition because I am having great success in Australian racing by laying the top weighted runners on rain affected tracks, so I was considering making a bot to do the same on UK tracks, but the program would need to know the track condition before placing a bet. That's all, I didn't mean to start WW3.
Leave a comment:
-
Hi Liam
Thanks for the info, I will have a dig around more when i get time. Maybe Betfair might consider adding course going to the metadata table, as it a lot more useful than some of the data they have already included.
BfExplorer, thanks for your constructive input, and putting words into my mouth
Regards
Leave a comment:
-
Geoff, it only confirms that you actually did not watch, what I posted, because in my video, you have got answers to Q2. Q3 and Q4. I did not want to post any url of endpoints because it is not publicly available and documented endpoint from betfair side, so it breaches betfair T&C. As any T&C on any web site does not allow web page parsing or using not official api's by third parties.Originally posted by geoffw123 View PostHello
I would be perfectly happy to answer any technical questions that you have regarding Betfair, guess what, for free of charge ! I am aware you are very knowledgeble on this subject so that is unlikely to be needed. The offer stands however.
From this and other posts, you seem to have no concept that people sometimes do things just to be helpful and pass on information without wanting financial reward.
I guess you dont want to answer the 4 questions I posted, never mind. I think I prefer living in my world than yours !
I dont want to get into an argument with you, just a polite request to tone down the adverts in future please. Thanks
Regards
Yes, betfair tolerates using of their data for personal use, mainly when it is really used by customer which use betfair for betting or trading.
If Liam posted here direct url of this undocumented end point, it is up to his understanding of law and any betfair T&C breaches are his problems. As what you post here can be used by entities having no interest in betfair betting (so not paying fees to betfair), but just taking betfair data for its own use.
So if you are asking, how to use betfair data without identifying yourself, so without login to betfair account, you are the one breaching betfair T&C, and I would suggest betfair team to scrutinize your activity here.
Leave a comment:
-
Sure Geoff, you can find the endpoint if you open up developer tools on chrome or IE and go to a horse racing market. The endpoint is:
https://www.betfair.com/rest/v2/raceCard
It uses uses an appKey that is stored on the betfair home page which looks to be static which you can find if you open up the source of a betfair page and search for it. The parameters are a bit odd so I recommend having a look at what the site sends.
Leave a comment:


Leave a comment: