HTTP 400 error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick JD
    Junior Member
    • Jan 2015
    • 47

    #1

    HTTP 400 error

    Hi folks. Doing some testing. Can anyone see any reasons why this json request is coming back with a 400 error? I'm stumped.

    Code:
    {
      "jsonrpc": "2.0",
      "method": "SportsAPING/v1.0/placeOrders",
      "params": {
        "marketId": "1.117484605",
        "instructions": [
          {
            "selectionId": "8621877",
            "handicap": "0",
            "side": "BACK",
            "orderType": "LIMIT",
            "limitOrder": {
              "size": "5",
              "price": "3.9",
              "persistenceType": "LAPSE"
            }
          }
        ][
          {
            "selectionId": "8621877",
            "handicap": "0",
            "side": "LAY",
            "orderType": "LIMIT",
            "limitOrder": {
              "size": "5.06",
              "price": "3.85",
              "persistenceType": "LAPSE"
            }
          }
        ]
      },
      "id": 1
    }
  • Franklin1
    Junior Member
    • Mar 2012
    • 91

    #2
    IMHO you should be looking at the betfair provided error code which will give you more information. See this thread where I attempted to help another user access this.

    http://forum.bdp.betfair.com/showthread.php?t=2721

    Comment

    • betdynamics
      Junior Member
      • Sep 2010
      • 534

      #3
      Note : I have not checked this, just a guess.

      Is the formatting of the instructions array correct?

      From a first glance it looks like you have too many square brackets.

      Shouldn't they be used to surround the whole instructions element rather than individual parts?

      i.e. remove the line that says ][ and replace it with a comma

      Comment

      • Nick JD
        Junior Member
        • Jan 2015
        • 47

        #4
        Originally posted by betdynamics View Post
        Note : I have not checked this, just a guess.

        Is the formatting of the instructions array correct?

        From a first glance it looks like you have too many square brackets.

        Shouldn't they be used to surround the whole instructions element rather than individual parts?

        i.e. remove the line that says ][ and replace it with a comma
        Oops, of course. Double list. Thanks, mate.

        Comment

        • merecat_
          Junior Member
          • May 2009
          • 35

          #5
          This can help...
          http://jsonformatter.curiousconcept.com/

          Comment

          Working...
          X