ba_betplaced

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

ba_betplaced

Postby neeeel » Wed Apr 10, 2013 5:52 pm

hi, gary, can you let me know the structure, parameters , etc of the ba_betplaced method? I did a search and found one thread on the forum where you lay out the structure, but when I tried it, I got an error message saying it wasnt correct

thanks
neeeel
 
Posts: 111
Joined: Sun Jun 27, 2010 1:14 pm

Postby neeeel » Wed Apr 10, 2013 5:53 pm

to clarify, Im talking about the event that is fired when a bet is placed
neeeel
 
Posts: 111
Joined: Sun Jun 27, 2010 1:14 pm

Postby osknows » Wed Apr 10, 2013 9:24 pm

This is an example of what I've used in VBA...


Code: Select all
Dim WithEvents ba As BettingAssistantCom.ComClass

Private Sub ba_betPlaced(ByVal ref As String, ByVal selecId As Long, ByVal avgPriceMatched As Double, ByVal sizeMatched As Double, ByVal resultCode As String, ByVal token As String)

    Debug.Print "event fired": Stop
End Sub

Private Sub placeBet_Click()
   
    .Cells(i, 27).Value = ba.placeBet(exchange, openingtrade, Odds, stake, False, bettoken)
End Sub


is this what you mean?
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby neeeel » Wed Apr 10, 2013 9:50 pm

ye, thanks osknows

:D
neeeel
 
Posts: 111
Joined: Sun Jun 27, 2010 1:14 pm

Postby kiint » Thu Apr 11, 2013 5:30 pm

This may be a silly question but, what would you use this event for?
If you have the bet ref returned by the placebet method, then doesn't that mean it's been placed?
kiint
 
Posts: 148
Joined: Tue Feb 23, 2010 12:12 am

Postby neeeel » Thu Apr 11, 2013 5:37 pm

yes, thats one way of doing it. But there may be times where you want to place a bet, but dont want to wait for the ref to be returned, but you do need the ref at some point. so this would be a way of placing the bet, continuing the execution of your program, and then retrieving the bet ref once the bet has been placed

Hope that makes sense :D
neeeel
 
Posts: 111
Joined: Sun Jun 27, 2010 1:14 pm

Postby kiint » Thu Apr 11, 2013 8:54 pm

Thanks Neeeel, it does make sense.
I hadn't realised that placebet could be made to work asynchronously. A quick search just turned up the waitForResult parm that I didn't realise existed.
I can see the option being very handy.

Cheers,
Kiint
kiint
 
Posts: 148
Joined: Tue Feb 23, 2010 12:12 am


Return to Discussion

Who is online

Users browsing this forum: No registered users and 22 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.