placeOrders error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BoogieWoogie
    Junior Member
    • Dec 2013
    • 12

    #1

    placeOrders error

    I've been using the example at and the API documentation to try and place an order, but get error code "-32602".

    I'm pretty sure I put in all the required parameters in my request:
    Code:
    {"jsonrpc": "2.0", "method": "SportsAPING/v1.0/placeOrders",  "params": {"marketId":["1.112260695"], "instructions":[{"orderType":"LIMIT", "selectionId":"8108266","handicap":"0", "side":"BACK", "limitOrder":{"size":"2", "price":"4.1", "persistenceType":"LAPSE"}    }], "customerRef":"fnodsguhb" } }
    The response is :
    Code:
    {"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"}}
    This one has me stumped - if anybody can see what's wrong here, please let me know
  • Oscar Jack
    Junior Member
    • Nov 2013
    • 9

    #2
    Here's a successful request sent using the Java Demo code:

    {"jsonrpc":"2.0","method":"SportsAPING/v1.0/placeOrders","id":"1","params":{"marketId":"1.1122 62997","instructions":[{"orderType":"LIMIT","selectionId":6633290,"handic ap":0.0,"side":"LAY","limitOrder":{"size":2.0,"pri ce":1.01,"persistenceType":"LAPSE"}}],"customerRef":"1","locale":"en_GB"}}

    Comment

    • bnl
      Junior Member
      • Nov 2012
      • 108

      #3
      Code:
      "selectionId":"8108266"
      should that not be integer?
      as in
      Code:
      "selectionId":8108266
      /Björn

      Comment

      • BoogieWoogie
        Junior Member
        • Dec 2013
        • 12

        #4
        Thanks guys,

        I took out the quotation marks for numeric values and it's working fine now.

        Comment

        Working...
        X