Problems with ListMarketBook ExBestOffersOverrides

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jezmy
    Junior Member
    • Apr 2013
    • 2

    #1

    Problems with ListMarketBook ExBestOffersOverrides

    Hi all,
    By default Betfair returns a price depth of 3 (3 Back and 3 Lay prices). I am trying to get a depth of 5 using exBestOfferOverrides, but there must be something wrong as I am only receiving the (default depth) of 3. Here is my request - can anyone suggest what I'm doing wrong please?

    {
    "method": "SportsAPING\/v1.0\/listMarketBook",
    "params": {
    "marketIds": [
    "1.152831450"
    ],
    "priceProjection": {
    "virtualise": true,
    "exBestOfferOverRides": {
    "bestPricesDepth": 5
    },
    "priceData": [
    "EX_BEST_OFFERS","EX_TRADED"
    ]
    },
    "orderProjection": "ALL"
    },
    "id": "1",
    "jsonrpc": "2.0"
    }


    Many thanks in advance!
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    Try exBestOffersOverRides

    Comment

    • Jezmy
      Junior Member
      • Apr 2013
      • 2

      #3
      Many thanks jabe - indeed it should have been "exBestOffersOverRides" in the request. However, I've discovered something else which has an effect on this request...
      I'm using the "delayed" key; the maximum "bestPricesDepth" is 3, the default. It would seem that on the delayed key it is possible to reduce the depth (I checked with 2 and it worked), but if you want more depth than 3 for any reason you would have to use a live application key (cost £299, so 'not just now, thank you!'). Here's a link to the relevant info on the differences between key types.
      https://docs.developer.betfair.com/d...KeyOverviewPBA

      Comment

      • newbie99
        Junior Member
        • Dec 2018
        • 62

        #4
        I'm having a problem with exBestOffersOverRides too (using listMarketBook), my parameters are as follows:

        $paramaters ='{"marketIds":['.$market_ids.'],"priceProjection":{"priceData":["SP_AVAILABLE","SP_TRADED","EX_ALL_OFFERS"],
        "virtualise":"true","exBestOffersOverrides":{" best PricesDepth":"2","rollupModel":"STAKE","rolloverSt akes":"false"}},
        "orderProjection":"EXECUTABLE", "matchProjection":"NO_ROLLUP"}';

        This does return prices, however I always get a price depth of 3 regardless and instead of showing me the top 3 prices, it appears to combine prices and sizes (so for example if the best price/size is £3 @ 3 and the next is £167 @ 3.05 the first price I get returned is £170 @ 3.05).

        This seems odd, but I suspect my priceProjection structure is incorrect or maybe I'm mis-using the Rollup parameters?

        Comment

        • jabe
          Senior Member
          • Dec 2014
          • 705

          #5
          Originally posted by newbie99 View Post
          I'm having a problem with exBestOffersOverRides too (using listMarketBook), my parameters are as follows:

          $paramaters ='{"marketIds":['.$market_ids.'],"priceProjection":{"priceData":["SP_AVAILABLE","SP_TRADED","EX_ALL_OFFERS"],
          "virtualise":"true","exBestOffersOverrides":{" best PricesDepth":"2","rollupModel":"STAKE","rolloverSt akes":"false"}},
          "orderProjection":"EXECUTABLE", "matchProjection":"NO_ROLLUP"}';

          This does return prices, however I always get a price depth of 3 regardless and instead of showing me the top 3 prices, it appears to combine prices and sizes (so for example if the best price/size is £3 @ 3 and the next is £167 @ 3.05 the first price I get returned is £170 @ 3.05).

          This seems odd, but I suspect my priceProjection structure is incorrect or maybe I'm mis-using the Rollup parameters?
          I believe the difference is down to your use of "virtualise":"true". I can't remember all the details, but the use of virtualise uses other bets - and I don't recall how - to create multiple bets that would have the same effect as a single bet, thereby allowing a particular price to effectively have more money available. The explanation - from perhaps 12-30 months back - is either in the documentation or on a forum thread, but I don't remember which, so you'd have to search. If you want the prices and sizes your call returns to match what you see on the Betfair site, try changing it to false, even if only for a test.

          Comment

          • newbie99
            Junior Member
            • Dec 2018
            • 62

            #6
            Originally posted by jabe View Post

            I believe the difference is down to your use of "virtualise":"true". I can't remember all the details, but the use of virtualise uses other bets - and I don't recall how - to create multiple bets that would have the same effect as a single bet, thereby allowing a particular price to effectively have more money available. The explanation - from perhaps 12-30 months back - is either in the documentation or on a forum thread, but I don't remember which, so you'd have to search. If you want the prices and sizes your call returns to match what you see on the Betfair site, try changing it to false, even if only for a test.
            Yeah, I've played around with that (initially I actually omitted it), however it makes no difference. Like you, I assumed it could be down to that, but its not.

            Comment

            • newbie99
              Junior Member
              • Dec 2018
              • 62

              #7
              For comparison, I attempted to simplify the parameters to the bare minimum:

              $paramaters ='{"marketIds":['.$market_ids.'],"priceProjection":{"priceData":["EX_ALL_OFFERS"]}}';

              Yet the result still bundles up the prices, which is not the result I would expect from the documentation.

              So I remain very confused!

              Comment

              • BetfairDeveloperProgram
                Administrator
                • Oct 2008
                • 635

                #8
                Hi newbie99

                If your using the Delayed App Key, the default max number of prices returned will always be 3.

                Please see the link below for an overview of Delayed vs Live App key permissions.

                https://docs.developer.betfair.com/d...KeyOverviewPBA

                Thanks

                Neil

                Comment

                • newbie99
                  Junior Member
                  • Dec 2018
                  • 62

                  #9
                  Originally posted by BetfairDeveloperProgram View Post
                  Hi newbie99

                  If your using the Delayed App Key, the default max number of prices returned will always be 3.

                  Please see the link below for an overview of Delayed vs Live App key permissions.

                  https://docs.developer.betfair.com/d...KeyOverviewPBA

                  Thanks

                  Neil
                  That I appreciate, what confused me was why this means the prices aren't just the first 3. It wasn't clear that the behaviour bundles up prices, I assumed it would just return the top 3, rather than combining to make 3 prices.

                  You explained it to me on another thread the other day I think :-)

                  Comment

                  Working...
                  X