listMarketBook error -32602 (invalid params)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wonker_
    Junior Member
    • Jun 2010
    • 5

    #1

    listMarketBook error -32602 (invalid params)

    I'm calling the listMarketBook method.

    My first request,
    Code:
    "jsonrpc":"2.0","id":1,"method":"SportsAPING/v1.0/listMarketBook","params":{"marketIds":["1.109309710"]}}
    returns
    Code:
    {"jsonrpc":"2.0","result":[{"marketId":"1.109309710", ... ]}],"id":1}
    That's all gravy.

    My second request,
    Code:
    {"jsonrpc":"2.0","id":2,"method":"SportsAPING/v1.0/listMarketBook","params":{"marketIds":["1.109309710"],"priceProjection":["EX_BEST_OFFERS"]}}
    returns,
    Code:
    {"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":2}
    I believe I'm missing something that's going to make me look very stupid...
  • PT_PT
    Junior Member
    • Nov 2012
    • 17

    #2
    Hi Wonker,

    Take a look at this page: https://api.developer.betfair.com/se...-+8th+May+2013

    This method has been changed yesterday, 8th May's release

    Comment

    • StefanBelo.
      Junior Member
      • Jan 2009
      • 105

      #3
      listMarketBook and priceProjection settings

      I want to query just best offered prices for back and lay, so I set my parameters:

      {
      "jsonrpc": "2.0",
      "method": "SportsAPING/v1.0/listMarketBook",
      "params": {
      "marketIds": [
      "1.109510186"
      ],
      "priceProjection": {
      "priceData": [
      "EX_BEST_OFFERS"
      ],
      "exBestOfferOverRides": {
      "bestPricesDepth": 1,
      "rollupModel": "NONE",
      "rollupLimit": 0
      }
      },
      "orderProjection": "ALL",
      "matchProjection": "NO_ROLLUP"
      },
      "id": 5
      }

      Instead of 1 price for back and lay there are 3 prices for back and lay. How should I set priceProjection and exBestOfferOverRides to get 1 or x number of prices for back and lay side?
      betfair bot platform, bfexplorer bot sdk

      Comment

      • StefanBelo.
        Junior Member
        • Jan 2009
        • 105

        #4
        listMarketBook and no bets in response

        The listMarketBook method will be used for updating selections prices as well. In such case when I am not interested for bet/s status placed on a market there is no way to set OrderProjection and MatchProjection to return no bets. Please add this option for this api method.
        betfair bot platform, bfexplorer bot sdk

        Comment

        • BetfairDeveloperProgram
          Administrator
          • Oct 2008
          • 679

          #5
          Instead of 1 price for back and lay there are 3 prices for back and lay. How should I set priceProjection and exBestOfferOverRides to get 1 or x number of prices for back and lay side?
          Please try

          Code:
          [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.109510186"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"exBestOffersOverrides":{"bestPricesDepth":"1","rollupModel":"NONE"}},"orderProjection":"ALL","matchProjection":"NO_ROLLUP"}, "id": 1}]

          Comment

          • BetfairDeveloperProgram
            Administrator
            • Oct 2008
            • 679

            #6
            In such case when I am not interested for bet/s status placed on a market there is no way to set OrderProjection and MatchProjection to return no bets. Please add this option for this api method
            Both OrderProjection and MatchProjection are optional fields. Therefore, if you only require price data you can exclude these from the listMarketBook request.

            Code:
            [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.109284082"],"priceProjection":{"priceData":["EX_BEST_OFFERS"]}}, "id": 1}]

            Comment

            • StefanBelo.
              Junior Member
              • Jan 2009
              • 105

              #7
              Originally posted by Betfair Developers Program View Post
              Please try

              Code:
              [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.109510186"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"exBestOffersOverrides":{"bestPricesDepth":"1","rollupModel":"NONE"}},"orderProjection":"ALL","matchProjection":"NO_ROLLUP"}, "id": 1}]

              Unfortunately treating that parameter as string does not return just 1 price in array, there are still returned 3 prices as by default.
              betfair bot platform, bfexplorer bot sdk

              Comment

              • StefanBelo.
                Junior Member
                • Jan 2009
                • 105

                #8
                Originally posted by Betfair Developers Program View Post
                Both OrderProjection and MatchProjection are optional fields. Therefore, if you only require price data you can exclude these from the listMarketBook request.

                Thanks, I did not realize that, now it works as expected.
                betfair bot platform, bfexplorer bot sdk

                Comment

                Working...
                X