Question about Market Version

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

    #1

    Question about Market Version

    Hi

    Here is a scenario that has cost me real money on more than one occasion.

    I place a few orders on the correct score market of a footy match. Not concentrating too much I don't notice that a bet of say 0-1 has not got matched and remains in the market. Then of course the home team scores before I notice it and then my 0-1 Back bet gets gobbled up by one of the bots.

    So I was very pleased to see the recent API update that allows the optional marketVersion number to be specified in PlaceBet().

    Doc states,
    This ‘version’ is incremented when significant events – runner removal, turn in-play etc. – occur
    I naturally assumed a goal being scored in the correct score market would increment the MarketVersion number as its the ideal use case for this new feature.

    When I came to test the code I added, I discovered it didn't work due to the simple reason Betfair don't seem to incremement this number when a goal goes in ?

    Can Betfair Dev's confirm or correct my statement here please ?

    If I am correct, please explain why you don't increment this number when a goal is scored. It makes no sense not to.

    Geoff
    Last edited by geoffw123; 14-10-2016, 11:26 AM.
  • BetfairDeveloperProgram
    Administrator
    • Oct 2008
    • 679

    #2
    Hi Geoff,

    If a bet is placed before a goal is scored and the market is suspended (which is the case for managed Correct Score markets), any bet sent with a version number should be rejected if received immediately after the market suspension due to the change in the version number.

    The documentation page has more information via http://docs.developer.betfair.com/do...rsionparameter

    Please raise a request with support via https://developer.betfair.com/support/ if you think you have an example that demonstrates that this didn't work as expected.

    Thanks

    Neil
    Last edited by Betfair Developer Program; 14-10-2016, 03:09 PM. Reason: correcting broken link

    Comment

    • jabe
      Senior Member
      • Dec 2014
      • 705

      #3
      The first link doesn't work.

      Comment

      • BetfairDeveloperProgram
        Administrator
        • Oct 2008
        • 679

        #4
        Hi Jabe

        Thanks for pointing this out, this has now been corrected.

        Neil

        Comment

        • jabe
          Senior Member
          • Dec 2014
          • 705

          #5
          Originally posted by Betfair Developers Program View Post
          Hi Jabe

          Thanks for pointing this out, this has now been corrected.

          Neil
          Thank you.

          Comment

          • betdynamics
            Junior Member
            • Sep 2010
            • 534

            #6
            Geoff

            I was under the impression that the way it worked was as follows:

            When you place a bet with a marketVersion specified, then the bet is rejected if the marketVersion has changed when Betfair processes the bet (i.e. when they attempt to place it into the Exchange)

            However, it does NOT cancel the bet if the marketVersion changes AFTER the bet has been placed onto the Exchange.

            In other words, it only applies to the bet placement operation.

            In your case, I think you are expecting the bet to be cancelled as the marketVersion has changed after the bet placement.

            Perhaps Neil could confirm the interpretation.

            Comment

            • geoffw123
              Senior Member
              • Mar 2014
              • 250

              #7
              Hi Neil

              Thanks for the reply, when I was trying to figure out what was going on with my code I put a typo into my debug code which meant I jumped to the wrong conclusion as to why the bet wasn't dropped.

              I have tested it properly now, the market version number sent by BF is changing as expected on a correct score market.

              For info, I will post some debug output as it is a bit more informative than the raw docs. Interestingly a false alarm suspension gives slightly different behaviour to a suspension due to a goal.

              Incident 1
              1: 18:48:15 Status = OPEN isInPlay=true MarketVersion is 1461804199
              2: 18:48:17 Status = OPEN isInPlay=true MarketVersion is 1461804199
              3: 18:48:19 Status = OPEN isInPlay=true MarketVersion is 1461804199
              4: 18:48:21 Status = OPEN isInPlay=true MarketVersion is 1461804199
              5: 18:48:23 Status = OPEN isInPlay=true MarketVersion is 1461804199
              6: 18:48:25 Status = SUSPENDED isInPlay=true MarketVersion is 1461805106
              7: 18:48:27 Status = SUSPENDED isInPlay=true MarketVersion is 1461805106
              8: 18:48:29 Status = SUSPENDED isInPlay=true MarketVersion is 1461805106
              !! Goal Scored !!
              9: 18:48:31 Status = OPEN isInPlay=true MarketVersion is 1461805910
              10: 18:48:33 Status = OPEN isInPlay=true MarketVersion is 1461805910
              11: 18:48:35 Status = OPEN isInPlay=true MarketVersion is 1461805910
              Incident 2
              406: 19:01:47 Status = OPEN isInPlay=true MarketVersion is 1461805910
              407: 19:01:49 Status = OPEN isInPlay=true MarketVersion is 1461805910
              408: 19:01:51 Status = OPEN isInPlay=true MarketVersion is 1461805910
              409: 19:01:53 Status = OPEN isInPlay=true MarketVersion is 1461805910
              410: 19:01:55 Status = SUSPENDED isInPlay=true MarketVersion is 1461836134
              411: 19:01:57 Status = SUSPENDED isInPlay=true MarketVersion is 1461836134
              412: 19:01:59 Status = SUSPENDED isInPlay=true MarketVersion is 1461836134
              413: 19:02:01 Status = SUSPENDED isInPlay=true MarketVersion is 1461836134
              414: 19:02:03 Status = SUSPENDED isInPlay=true MarketVersion is 1461836134
              415: 19:02:05 Status = SUSPENDED isInPlay=true MarketVersion is 1461836134
              !! False Alarm no goal scored !!
              416: 19:02:07 Status = OPEN isInPlay=true MarketVersion is 1461836734
              417: 19:02:09 Status = OPEN isInPlay=true MarketVersion is 1461836734
              418: 19:02:11 Status = OPEN isInPlay=true MarketVersion is 1461836734
              419: 19:02:13 Status = OPEN isInPlay=true MarketVersion is 1461836734
              420: 19:02:16 Status = OPEN isInPlay=true MarketVersion is 1461836734
              421: 19:02:18 Status = OPEN isInPlay=true MarketVersion is 1461836734
              422: 19:02:20 Status = OPEN isInPlay=true MarketVersion is 1461836734

              Comment

              • geoffw123
                Senior Member
                • Mar 2014
                • 250

                #8
                Hi BetDynanics

                Thanks for the insightful post, you have put your finger on where the confusion has arisen. The exact wording from the docs is
                This functionality should be of use to those who want to bet right up to the actual ‘off’ of a horse race or sporting event but be confident that you’re not inadvertently bet into the first seconds of in-play after the off. Similarly, in managed football markets, you can avoid your bets reaching the Exchange after the market has reformed following a goal being scored etc.
                Now I have read it through again I think I agree with your interpretation. If a bet has been sitting as unmatched for 10 minutes with a sent marketVersion=X and then a goal is scored and reforms with marketVersion=Y. That bet will not be cancelled.

                This makes it a pretty uninteresting feature for me now as it doesn't solve the scenario I described in the first post. Oh well guess I need to pay more attention so the bots don't gobble up my dumb orders.

                It would be good if Neil could just confirm Betdynamics conclusions as its a bit of a subtle point. Thanks

                Geoff

                Comment

                Working...
                X