Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Reply
 
Thread Tools Search this Thread Display Modes
  #31  
Old 19th January 2021, 12:36 AM
Martinw Martinw is offline
Member
 
Join Date: May 2012
Posts: 40
Default TAB api

Have TAB changed their conditions for accessing their api? On their webpage they have an application form in order to connect to TAB. I applied a few years ago but got refused with no explanation.

Looking again, under How it works the api seems to be available.
So what is happening?
Any clarification would be great.
I am still using the Tatts api but TAB have turned off the account features and so I cannot place bets automatically.
Ta,
Martin
Reply With Quote
  #32  
Old 19th January 2021, 12:45 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

I haven't looked at placing bets but i know i have access to all prices and form, this is just my experiment in learning to program a functional replacement for excel as i still use gruss to place my bets.

For the moment i am providing all my python code so others can learn.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #33  
Old 19th January 2021, 02:28 PM
Martinw Martinw is offline
Member
 
Join Date: May 2012
Posts: 40
Default Re TAB

Thanks for that. I will look at moving across to TAB's api as soon as I can. Ta, Martin
Reply With Quote
  #34  
Old 19th January 2021, 03:43 PM
ballybeg ballybeg is offline
Member
 
Join Date: Jun 2012
Posts: 12
Default

The TAB api is accessible to pull down race data and odds and so on, but to place bets - and any access to the accounting api - you need to be approved by TAB - you will be given a client token that is used to create access tokens each time you place a bet.


When it started you needed to be Silver or (Gold?) status to get betting access to the api - that meant turnover of about $25k per year.

Not sure what the situation is now
Reply With Quote
  #35  
Old 23rd January 2021, 01:15 PM
Martinw Martinw is offline
Member
 
Join Date: May 2012
Posts: 40
Default

Thanks for that. I don't want to have to throw 25k down the loo on bets I am not sure of. And I do not want to sit at my computer all day, every day to use my software and place bets manually. They have made it too hard if that is still the case. Ta, Martin
Reply With Quote
  #36  
Old 5th March 2021, 10:31 AM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

I am slowly getting python to replace what i used to do in excel, so far i can pull race data and results info, i can also get past form but only what is available on race day but still useful, i have also implemented one of my black book systems to make selections and print out those selections to txt doc.

i am having one issue when getting results if they are not available it throws a KeyError

I have looked at a few options for this error but none work, all i need is if no results just to skip this section, the program still runs regardless but better to not have errors i guess.

Code:
def check_results(): global res1, res2, res3, res4 urlR = "https://api.beta.tab.com.au/v1/tab-info-service/racing/dates/" + str(date) + "/meetings/R/" + \ str(listbox1.get(ANCHOR)) + "/races/" + str(venue_numberbox.get()) + "?jurisdiction=NSW" result = requests.get(urlR) result1 = json.loads(result.content) res1 = "" res2 = "" res3 = "" res4 = "" try: res1 = result1["results"][0][0] except IndexError: pass try: res2 = result1["results"][1][0] except IndexError: pass try: res3 = result1["results"][2][0] except IndexError: pass try: res4 = result1["results"][3][0] except IndexError: pass return def results1(): global res, colour colour = "black" try: if res == "1st": colour = "darkgreen" except KeyError: pass try: if res == "2nd": colour = ("gold") except KeyError: pass try: if res == "3rd": colour = ("blue") except KeyError: pass try: if res == "4th": colour = ("purple") except KeyError: pass listbox3.itemconfig(END, fg=colour) listbox4.itemconfig(END, fg=colour) listbox5.itemconfig(END, fg=colour) listbox6.itemconfig(END, fg=colour) listbox7.itemconfig(END, fg=colour) listbox8.itemconfig(END, fg=colour) listbox9.itemconfig(END, fg=colour) listbox10.itemconfig(END, fg=colour) listbox11.itemconfig(END, fg=colour) listbox12.itemconfig(END, fg=colour) listbox13.itemconfig(END, fg=colour) listbox14.itemconfig(END, fg=colour) listbox15.itemconfig(END, fg=colour) listbox16.itemconfig(END, fg=colour) listbox17.itemconfig(END, fg=colour) listbox18.itemconfig(END, fg=colour) listbox25.itemconfig(END, fg=colour)
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #37  
Old 13th March 2021, 03:42 AM
chook chook is offline
Member
 
Join Date: Jan 2019
Posts: 14
Default

Shaun: try colour like this?
a_res = **** "1st":'darkgreen', "2nd":'gold', "3rd":'blue', "4th":'purple' ****

colour = 'black'
if res in a_res:
colour = a_res[res]

key error happens if your key is not in the dictionary.
Reply With Quote
  #38  
Old 16th May 2021, 10:06 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

Time for an update.

I have spent many hours practicing my python skills, my work is pretty average but functional.

my latest creation that can be found in my link is "BSP - 16-05-21" there is an exe plus a txt with code.

As with my other programs this will allow you to access the TAB website and gather race info, it collects race results if known.

I have included 5 systems, these aren't the holy grail but more ideas on what is possibly with python and some imagination.

The program prints out the system bets in a format that can be imported to excel, i also included a timezone list so races are listed in your timezone.

There is an info tab that explains how to run things.

have fun and any thoughts appreciated.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 01:20 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655