API NG

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

Moderator: 2020vision

Re: API NG

Postby mak » Tue Jul 25, 2017 4:16 pm

I am very confused with the coding part since I don't know a lot and can not understand how it works
sometimes it does move to the next market, some times not.
really need a developer here to help me out I think

the problem is that there are some bugs in this version also which makes it very difficult for me

if I place a bet in default profile, the bet manager shows the bets fine
but if open a second profile in the second profile does not showing any bets
this is happening if I place the bet manual or through excel
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Re: API NG

Postby Captain Sensible » Tue Jul 25, 2017 4:41 pm

mak wrote:I am very confused with the coding part since I don't know a lot and can not understand how it works
sometimes it does move to the next market, some times not.
really need a developer here to help me out I think

the problem is that there are some bugs in this version also which makes it very difficult for me

if I place a bet in default profile, the bet manager shows the bets fine
but if open a second profile in the second profile does not showing any bets
this is happening if I place the bet manual or through excel


Have you got the latest beta version, there was a problem with earlier versions not picking up bet data if they were placed outside of that instance of Betting Assistant, that's now been fixed afaik.

I had a quick look thru the code in this post

posting.php?mode=quote&f=3&p=50364#pr50337

and it does appear to have been all cobbled together with no consistency with referencing cells and also duplicate and unneccessary coding.

From what I can see you'd be much better just starting from scratch as it doesn't seem to be trying to do much more than , clear the CANCELLED refs , timestamp the inplay time, move market once a market has suspended/closed and reloading the QPL
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: API NG

Postby alrodopial » Tue Jul 25, 2017 6:26 pm

It was easier than I thought
It turns full stream on only while race is in running
I tested it in 3/4 races and it looks good

Code: Select all
Dim marketChanging As Boolean, currentMarket As String, triggerInQ2 As Variant

Private Sub Worksheet_Change(ByVal Target As Range)
   
    If Target.Columns.Count = 16 Then
        Dim BA_Array() As Variant, MyQ2 As Variant
        Application.EnableEvents = False
        With ThisWorkbook.Sheets(Target.Worksheet.Name)
       
            BA_Array = .Range("A1:BZ55").Value ' this read is probably too much for every update while full stream is on
           
            'If BA_Array(2, 59) <= 520 And Target(2, 6) <> "Closed" Then
                'MyQ2 = "FULL-STREAM-ON"
            'Else
                'MyQ2 = "FULL-STREAM-OFF"
            'End If
           
           
            If Target(2, 5) = "In Play" And Target(2, 6) = "" Then ' is this If statement needed????
                MyQ2 = "FULL-STREAM-ON"
                ' ...........
            ElseIf (Target(2, 5) = "In Play" And Target(2, 6) = "Suspended") Or Target(2, 6) = "Closed" Then
                If Not marketChanging Then
                    marketChanging = True
                    currentMarket = Target(1, 1)
                    MyQ2 = -1
                Else
                    If Target(1, 1) <> currentMarket Then marketChanging = False
                End If
            Else
                MyQ2 = "FULL-STREAM-OFF"
            End If
           
            If triggerInQ2 <> MyQ2 Then
                .Range("Q2").Value = MyQ2
                triggerInQ2 = MyQ2
            End If
            ' ..........
        End With
        ' ..........
        Application.EnableEvents = True
    End If
       
End Sub
alrodopial
 
Posts: 1353
Joined: Wed Dec 06, 2006 9:59 pm

Re: API NG

Postby Captain Sensible » Tue Jul 25, 2017 6:34 pm

Yep, I must admit I wasn't too sure why the <=520 was in the code as it did seem to be an inrunning bot. I did a tweaked version of the full code it with the <=520 in, stripping out any unnecessary parts and all seemed to work OK for me, I won't post it as there's no point in confusing the issue
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: API NG

Postby mak » Tue Jul 25, 2017 8:38 pm

just arrived home
I will test it tomorrow.
thanks both of you!!
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Re: API NG

Postby mak » Wed Jul 26, 2017 2:07 pm

Al
I think this will work ok!

I have opened a new thread for some vba help because Captain have a point
I will try to make all the calculations in vba
so if you can please help :)

viewtopic.php?f=5&t=9815
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Re: API NG

Postby KESIMKESIM » Thu Aug 03, 2017 5:49 pm

Hi Gary/Mark,

I've discovered another fault with the API-NG. The problem definitely occurs if you have more than 2 tabs open.

Today whilst betting on Goodwood I've had a number of tabs open and noticed that getting into the last 15 mins before race time as volume builds up, BA starts to lag behind the BF website in terms of matched volume and odds & money displayed. The closer to off time then the problem is very severe.

It appears that data is being downloaded to BA but then it is somehow 'throttling' the release of that data to the screen. As an example, I had three tabs open - 17.20 race, 16.35 at Galway and the 15.35 Goodwood. At the off time on the 15.35, BA was showing a matched total of £2.72 million, whereas BF website showed £3.24 million. When the race started BA did not go in play and continued to display data which was about 5 mins behind real time. BA finally went in play 5 mins later and then 'plays out' the data over the next minute or so and then shows the race as suspended.

Having noticed this I did a few more tests, but not exhaustive, which showed this was happening all the time. With two tabs it worked o.k. but with 4 tabs opened with 3 races for tomorrow then BA failed again even though there was obviously little activity on the other 3 tabs for tomorrows racing.
I tried this with and without spreasheets attached and it seemed to make no difference to the problem.

I'll leave it to you to have a look into this and revert back to the approved version for the time being.

Many Thanks and Best Regards,

Ian
KESIMKESIM
 
Posts: 74
Joined: Thu Nov 26, 2009 3:55 pm
Location: East Yorkshire

Re: API NG

Postby Captain Sensible » Thu Aug 03, 2017 5:55 pm

If you're having data delays of 5 minutes sounds like Betfair may be restricting your account.
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: API NG

Postby KESIMKESIM » Thu Aug 03, 2017 8:34 pm

Thanks for your reply Captain, but everything works fine on version 37a, it's just the API-NG that doesn't appear to work.

Has anyone else tried with multiple tabs/races on the API-NG? Grateful for any feedback.
KESIMKESIM
 
Posts: 74
Joined: Thu Nov 26, 2009 3:55 pm
Location: East Yorkshire

Re: API NG

Postby Captain Sensible » Thu Aug 03, 2017 8:44 pm

No problem, just seen lots of posts recently where Betfair have been restricting accounts to delayed feeds and it's an easy one to check. 5 minutes seems a long delay, are you streaming or just refreshing at a set rate. Can't imagine BA would be caching 5 minutes of price data.
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: API NG

Postby KESIMKESIM » Thu Aug 03, 2017 8:51 pm

I tried both streaming and refreshing at 0.2 secs - same effect. It appears that BA is just buffering the incoming data from BF in some way.
KESIMKESIM
 
Posts: 74
Joined: Thu Nov 26, 2009 3:55 pm
Location: East Yorkshire

Re: API NG

Postby MarkRussell » Fri Aug 04, 2017 10:21 am

KESIMKESIM wrote:I tried both streaming and refreshing at 0.2 secs - same effect. It appears that BA is just buffering the incoming data from BF in some way.


Hi,

The software isn't buffering the data but as Captain Sensible said Betfair can and do put restrictions on access to the API that has a delayed affect.
Usually when they have done this to an account the Total Matched figure for an active market remains at zero.

Regards,
Mark
User avatar
MarkRussell
Site Admin
 
Posts: 1787
Joined: Tue Feb 20, 2007 6:38 pm
Location: Birmingham

Re: API NG

Postby KESIMKESIM » Fri Aug 04, 2017 11:51 am

Thanks for getting back to me.

Can I ask, under what circumstances would BF do this? Is it something I'm doing that is causing BF to do this? I can adjust the way I work if its something I'm doing wrong, however back on v34a today, so far everything is fine.

Ian
KESIMKESIM
 
Posts: 74
Joined: Thu Nov 26, 2009 3:55 pm
Location: East Yorkshire

Re: API NG

Postby MarkRussell » Fri Aug 04, 2017 12:34 pm

KESIMKESIM wrote:Thanks for getting back to me.

Can I ask, under what circumstances would BF do this? Is it something I'm doing that is causing BF to do this? I can adjust the way I work if its something I'm doing wrong, however back on v34a today, so far everything is fine.

Ian


Hi,

It shouldn't matter what version of the software you are using if they have applied the restriction.
You would need to contact Betfair to ask why if it is the case.
You can contact the API team at Betfair by submitting a Ticket via their support page.
See https://developer.betfair.com/support/

Regards,
Mark
User avatar
MarkRussell
Site Admin
 
Posts: 1787
Joined: Tue Feb 20, 2007 6:38 pm
Location: Birmingham

Re: API NG

Postby Captain Sensible » Fri Aug 04, 2017 3:40 pm

If everything is fine on the non-treaming version it doesn't sound like you're being restricted, they restrict all API access regardless of what software you'd be using. You could check just by using the live chat on the website , they should be able to say if there's any restriction on your account even if they don't know the reason why.

Does the memory on BA rise during this period as it'd have to be storing 5 minutes of streaming data somewhere if it was withholding the data for some reason. What version is showing on the top line ?
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

PreviousNext

Return to Discussion

Who is online

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