getPrices

Please post any questions regarding the program here.

Moderator: 2020vision

getPrices

Postby gvigliani » Tue Oct 18, 2022 8:52 am

Good morning everyone.
I use the Com to upload the races and all the information regarding the races themselves.
I can't understand why getPrices always or almost always detects fewer participants (Horses or Greyhounds)


Code: Select all
If ba Is Nothing Then
    Set ba = New BettingAssistantCom.ComClass
End If
Dim prices
Dim price
prices = ba.getPrices
For Each price In prices
     nn
     nn
     nn
     nn
next price




Thank you
User avatar
gvigliani
 
Posts: 166
Joined: Thu Aug 13, 2009 3:11 pm
Location: Italia

Re: getPrices

Postby GaryRussell » Tue Oct 18, 2022 2:29 pm

Are you sure it isn't just excluding non runners?
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: getPrices

Postby gvigliani » Tue Oct 18, 2022 7:56 pm

Thank you ,

Absolutely no.
I have also thought about this but by checking on the Betting Assistant and also on Betfair.com
all the competitors are starters
User avatar
gvigliani
 
Posts: 166
Joined: Thu Aug 13, 2009 3:11 pm
Location: Italia

Re: getPrices

Postby GaryRussell » Wed Oct 19, 2022 6:16 am

Are you saying there are markets where you cannot retrieve prices for all selections with getPrices? There isn't a bug that I am aware of. Unfortunately, your code sample isn't enough to provide evidence. I see you are asking for an example in VB.Net. I will provide one which uses getPrices()
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: getPrices

Postby gvigliani » Wed Nov 02, 2022 11:58 am

Yesterday, the Get Prices function gave me an error on a match that had ended:
"Run Time Error 10
This Array is fixed or temporarely locked. "
Is there any way to catch errors on this function?
Thank you
User avatar
gvigliani
 
Posts: 166
Joined: Thu Aug 13, 2009 3:11 pm
Location: Italia

Re: getPrices

Postby GaryRussell » Wed Nov 02, 2022 12:38 pm

gvigliani wrote:Yesterday, the Get Prices function gave me an error on a match that had ended:
"Run Time Error 10
This Array is fixed or temporarely locked. "
Is there any way to catch errors on this function?
Thank you

There will be a way, but it depends on which language how it is implemented. Are you using VBA or VB.Net?
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: getPrices

Postby GaryRussell » Wed Nov 02, 2022 12:47 pm

If you are using VB.Net then code something like the following:-

Code: Select all
        Dim prices() As Object
        Try
            prices = BA.getPrices()
        Catch ex As Exception
            ' Error handling code goes here
        End Try
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: getPrices

Postby gvigliani » Wed Nov 02, 2022 8:35 pm

I'm using VBA.

Thanks
User avatar
gvigliani
 
Posts: 166
Joined: Thu Aug 13, 2009 3:11 pm
Location: Italia

Re: getPrices

Postby GaryRussell » Thu Nov 03, 2022 11:22 am

In VBA then code something like the following. It's not as elegant as VB.Net

Code: Select all
    Dim prices() As Variant
    Dim price As Variant
   ' If any of the following statements fail then execution will resume after pricesProcessed:
    On Error GoTo pricesProcessed
    prices = ba.getPrices()
    For Each price In prices
        Debug.Print price.backOdds1
    Next
pricesProcessed:
    On Error GoTo 0 ' turns off error trapping
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

Users browsing this forum: No registered users and 119 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.