listMarketBook response does not contain prices

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • risilloch
    Junior Member
    • Dec 2012
    • 5

    #1

    listMarketBook response does not contain prices

    Hi,
    I have a program that has integrated with Betfair via the Betting API for a number of years.
    Recently listMarketBook has stopped returning the ExchangePrices component of Runner.

    I've used the Visualiser tool to confirm that i get the same behaviour.

    For example, for tonights game Norwich v Leicester i supply listMarketBook with

    {"marketIds":["1.168897169"],"priceProjection":{"priceData":["SP_AVAILABLE"]},"orderProjection":null,"matchProjection":null,"l ocale":null,"currencyCode":null}

    and get the return

    {"jsonrpc":"2.0","result":[{"marketId":"1.168897169","isMarketDataDelayed":fa lse,"status":"OPEN","betDelay":0,"bspReconciled":f alse,"complete":true,"inplay":false,"numberOfWinne rs":1,"numberOfRunners":3,"numberOfActiveRunners": 3,"lastMatchTime":"2020-02-28T19:02:31.384Z","totalMatched":1175310.29,"total Available":584500.42,"crossMatching":true,"runners Voidable":false,"version":3174514772,"runners":[{"selectionId":47998,"handicap":0.0,"status":"ACTI VE","lastPriceTraded":4.3,"totalMatched":111158.38 },{"selectionId":48461,"handicap":0.0,"status":"AC TIVE","lastPriceTraded":1.94,"totalMatched":998894 .71},{"selectionId":58805,"handicap":0.0,"status": "ACTIVE","lastPriceTraded":3.95,"totalMatched":652 57.19}]}],"id":1}

    Has something changed with listMarketBook recently?

    I'm thinking that my account may have been restricted?

    cheers

    risilloch

  • geoffw123
    Senior Member
    • Mar 2014
    • 250

    #2
    Hiya

    I am guessing you are seeing that response as you have only selected SP_AVAILABLE, which doesnt make much sense for a footy game. Try it again on the visualiser but instead select EX_ALL_OFFERS, what do you get returned now ?

    Comment

    • risilloch
      Junior Member
      • Dec 2012
      • 5

      #3
      Hi geoffw123,
      thanks for responding. Just tried EX_ALL_OFFERS in the visualiser. No change - still no prices. But that might be because that game has kicked off?

      I'm displaying my ignorance on what these constants actually mean. I have used SP_AVAILABLE with rugby matches and found that it gave me the prices i wanted.

      thanks

      risilloch

      Comment

      • risilloch
        Junior Member
        • Dec 2012
        • 5

        #4
        Just tried for tomorrow's Liverpool v Watford game (1.168896862) and still no prices

        Comment

        • geoffw123
          Senior Member
          • Mar 2014
          • 250

          #5
          hiya

          I was a bit puzzled by the visualiser myself as i dont really usually use it. In the GUI box for prices I didnt see anything listed myself, Probably operator error
          But Instead I was using Chrome Dev Tools to look at the json comms back and forth. I could see all the prices being returned to me in the Json logs.

          The fact that the game was in play makes no difference, you would still see prices returned. Did you look at the json comms to confirm no price data returned ? If you can, post the Json send and response string in here.

          Update, I tried your liverpool marketId

          Sent
          Code:
          [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.168896862"],"priceProjection":{"priceData":["EX_ALL_OFFERS"]}}, "id": 1}]
          Response
          Code:
          [{"jsonrpc":"2.0","result":[{"marketId":"1.168896862","isMarketDataDelayed":false,"status":"OPEN","betDelay":0,"bspReconciled":false,"complete":true,"inplay":false,"numberOfWinners":1,"numberOfRunners":3,"numberOfActiveRunners":3,"lastMatchTime":"2020-02-28T21:56:32.801Z","totalMatched":128428.58,"totalAvailable":654320.2,"crossMatching":true,"runnersVoidable":false,"version":3174514506,"runners":[{"selectionId":56301,"handicap":0.0,"status":"ACTIVE","lastPriceTraded":9.0,"totalMatched":22613.74,"ex":{"availableToBack":[{"price":9.0,"size":193.83},{"price":8.8,"size":326.4},{"price":8.6,"size":134.7},{"price":8.4,"size":426.88},{"price":8.2,"size":25.25},{"price":8.0,"size":100.0},{"price":7.8,"size":2.0},{"price":7.6,"size":791.61},{"price":7.4,"size":28.8},{"price":7.0,"size":2.0},{"price":6.8,"size":0.81},{"price":5.4,"size":1.25},{"price":3.8,"size":1.96},{"price":1.1,"size":10000.0},{"price":1.09,"size":10000.0},{"price":1.08,"size":10000.0},{"price":1.07,"size":10000.0},{"price":1.06,"size":14000.0},{"price":1.05,"size":17002.0},{"price":1.04,"size":35000.0},{"price":1.03,"size":45103.98},{"price":1.02,"size":45002.0},{"price":1.01,"size":50190.83}],"availableToLay":[{"price":9.2,"size":804.06},{"price":9.4,"size":743.78},{"price":9.6,"size":382.29},{"price":9.8,"size":50.0},{"price":10.0,"size":94.93},{"price":10.5,"size":341.94},{"price":11.0,"size":742.45},{"price":11.5,"size":467.91},{"price":15.5,"size":3.02},{"price":25.0,"size":3.03},{"price":75.0,"size":8.0},{"price":150.0,"size":4.0},{"price":300.0,"size":2.0},{"price":600.0,"size":1.0},{"price":800.0,"size":0.83},{"price":1000.0,"size":7.0}],"tradedVolume":[]}},{"selectionId":56323,"handicap":0.0,"status":"ACTIVE","lastPriceTraded":1.44,"totalMatched":82612.07,"ex":{"availableToBack":[{"price":1.43,"size":6073.25},{"price":1.42,"size":5591.98},{"price":1.41,"size":10564.09},{"price":1.4,"size":20010.5},{"price":1.39,"size":10155.97},{"price":1.38,"size":11674.45},{"price":1.37,"size":11722.06},{"price":1.36,"size":11171.1},{"price":1.35,"size":235.85},{"price":1.24,"size":22.92},{"price":1.2,"size":2.0},{"price":1.15,"size":36.67},{"price":1.1,"size":10000.0},{"price":1.09,"size":10000.0},{"price":1.08,"size":10000.0},{"price":1.07,"size":10000.0},{"price":1.06,"size":14000.0},{"price":1.05,"size":17002.0},{"price":1.04,"size":40000.0},{"price":1.03,"size":60103.98},{"price":1.02,"size":60002.0},{"price":1.01,"size":60193.95}],"availableToLay":[{"price":1.44,"size":605.86},{"price":1.45,"size":5170.41},{"price":1.46,"size":1811.61},{"price":1.47,"size":1183.09},{"price":1.48,"size":292.9},{"price":1.49,"size":100.0},{"price":1.5,"size":614.05},{"price":1.51,"size":121.33},{"price":1.52,"size":537.25},{"price":1.53,"size":100.0},{"price":1.54,"size":78.46},{"price":1.58,"size":7.42},{"price":1.75,"size":107.65},{"price":2.22,"size":3.03},{"price":75.0,"size":8.0},{"price":150.0,"size":4.0},{"price":300.0,"size":2.0},{"price":600.0,"size":1.0},{"price":800.0,"size":0.83},{"price":1000.0,"size":7.0}],"tradedVolume":[]}},{"selectionId":58805,"handicap":0.0,"status":"ACTIVE","lastPriceTraded":5.2,"totalMatched":23202.75,"ex":{"availableToBack":[{"price":5.1,"size":853.36},{"price":5.0,"size":2462.37},{"price":4.9,"size":1726.65},{"price":4.8,"size":729.43},{"price":4.7,"size":563.26},{"price":4.5,"size":4.29},{"price":4.4,"size":2.0},{"price":4.1,"size":2.0},{"price":4.0,"size":6.67},{"price":3.05,"size":10.0},{"price":1.05,"size":2.0},{"price":1.03,"size":105.98},{"price":1.01,"size":28.25}],"availableToLay":[{"price":5.2,"size":1830.69},{"price":5.3,"size":1859.44},{"price":5.4,"size":1558.8},{"price":5.5,"size":1232.38},{"price":7.0,"size":3.02},{"price":9.6,"size":3.03},{"price":75.0,"size":8.0},{"price":150.0,"size":4.0},{"price":190.0,"size":2.34},{"price":300.0,"size":2.0},{"price":600.0,"size":1.0},{"price":800.0,"size":0.83},{"price":950.0,"size":2.2},{"price":1000.0,"size":7.0}],"tradedVolume":[]}}]}],"id":1}]
          Seems to work OK for me, availableToBack and availableToLay returned
          Last edited by geoffw123; 28-02-2020, 11:08 PM.

          Comment

          • risilloch
            Junior Member
            • Dec 2012
            • 5

            #6
            hi geoffw123,
            i wasn't aware of the Chrome Dev Tools - very useful.

            I was able to see that price data was being returned for EX_BEST_OFFERS and was not for SP_AVAILABLE.

            Looks like something has recently changed internally in Betfair with regards to SP_AVAILABLE.

            With regard to Visualiser you have to explicitly select one of the Runners before the associated prices display.
            (I only now just discovered that)

            thank you very much for taking the time to help

            cheers

            risilloch

            Comment

            • geoffw123
              Senior Member
              • Mar 2014
              • 250

              #7
              No problem, glad to help out. I dont think anything has changed though, football markets never had Starting Price capability AFAIK. Maybe you were remembering that it used to work for horse racing markets ?

              Comment

              Working...
              X