Voided Bets Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • geoffw123
    Senior Member
    • Mar 2014
    • 250

    #1

    Voided Bets Question

    I am using the Betfair Streaming API and hit a bug in my program yesterday that actually cost me money in a Portuguese football match. That was pretty annoying but even worse is that is it not clear on what I need to do exactly to fix it and it is extremely difficult to test any fixes I do implement.

    What happened was that the score in the game went to 1-1, and the market unsuspended for 30 seconds or so, during which time i placed my bet on the 1-1 score. Then the market suspended again and the score went backwards to 1-0. I am guessing Portugal have VAR and that caused Betfair's score confusion.
    Checking later I can see that Betfair had voided my 1-1 bet, presumably that is their policy on VAR corrections ?

    My code for processing incoming stream orders had missed this voided order and was incorrectly showing me that the bet had been placed and i was in profit. Of course you can guess what the final score on the match was, yep a real 1-1. So went to check my winnings and found I had lost on the game due to the voided bet.

    The Betfair spec isnt detailed enough for me to know how to check for voided orders accurately. Their is a field in the order packet for "Sv" = Size Voided.

    My question is what would a typical voided packet look like ?

    For example:

    Q1) Does a voided order have a new betId or same betId as the original order it is voiding

    Q2) Is a voided order marked as execution complete or still executable ?

    Q3) Can I assume that Size remainig will always be the same amount as the original bet it is voiding. I cant imagine a scenario where for instance you might want to just void 50% of the original bet ? Maybe that is possible though ?

    Has anyone ever captured a voided order packet ? That would be very handy to see how this stuff is meant to work

    If anyone or BDP Tech support could answer my 3 questions above it would be very helpful. Thanks for your time

    Geoff


    Last edited by geoffw123; 24-02-2019, 12:49 PM.
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    An easy way to test is place an order just before a market is about to complete / close, the order will then be ‘voided’ when the market is closed.

    1) No betid change
    2) Not sure
    3) You can get a percentage matched and the remaining voided, for example a percentage gets matched before a market closed

    Comment

    • geoffw123
      Senior Member
      • Mar 2014
      • 250

      #3
      Hi Liam

      Thanks for the reply.

      Maybe I didnt understand your first point, but I dont think it is correct. If a bet is placed just before a market suspends/closes and is not matched then that bet becomes "Lapsed" not "Voided", they are not the same thing. The API-NG listClearedOrders() command distinguishes between these states.

      Thats why I said this is a pig to test as "Voided" bets happen so infrequently and unpredictably, I.e when there is a football VAR screw up.

      On Q3)
      If for exampe I had placed a bet of 10 quid on the score that was the VAR error then say 5 quid was matched before the score was corrected, I had assumed Betfair would Void the entire 10 quid bet, not just the unmatched part, but yes I can see they might just void the remaining 5 quid.

      We could do with one of the Betfair Tech support guys to answer this definitively.

      Regards Geoff

      Comment

      • BetfairDeveloperProgram
        Administrator
        • Oct 2008
        • 680

        #4
        Hi Geoff,

        Please see answers below:

        Q1) Does a voided order have a new betId or same betId as the original order it is voiding

        The betId will remain the same.

        Q2) Is a voided order marked as execution complete or still executable ?

        Execution complete

        Q3) Can I assume that Size remainig will always be the same amount as the original bet it is voiding. I cant imagine a scenario where for instance you might want to just void 50% of the original bet ? Maybe that is possible though ?

        No, because its possible for a bet to be partially void. For example, in a scenario were part of a bet is matched first and the remainder is determined to have been matched after a goal has been score (when market should have been suspended).

        Thanks

        Neil

        Comment

        • geoffw123
          Senior Member
          • Mar 2014
          • 250

          #5
          Thanks very much for the answer Neil

          Regards Geoff

          Comment

          Working...
          X