Error when placing bet: DSC-0018 / -32602

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcinoski
    Junior Member
    • Jun 2014
    • 4

    #1

    Error when placing bet: DSC-0018 / -32602

    Hello,

    I'm using Python and API-NG to place a bet using the below request, but even though response is 200 (OK), the response text is:

    response text: {"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":1}

    and, of course, my bet isn't placed.

    This is my request:

    '{"method": "SportsAPING/v1.0/placeOrders", "params": {"customerRef": "bbeeOrder", "instructions": {"1.112173851": [{"limitOrder": {"price": "1.37", "size": "2.0", "persistenceType": "LAPSE"}, "selectionId": "18", "side": "BACK", "orderType": "LIMIT"}]}, "marketId": "1.112173851"}, "jsonrpc": "2.0", "id": 1}'


    Can you please tell me what am I doing wrong ?

    Thanks in advance.
    M.
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    The values for price, size and selectionId should not be in quotes as they are numeric values.

    Also, the start of your instructions area seems somewhat strange - what is the leading "1.112173851": ?

    Comment

    • marcinoski
      Junior Member
      • Jun 2014
      • 4

      #3
      I tried without quotes with below request, but still got the same error:

      '{"method": "SportsAPING/v1.0/placeOrders", "id": 1, "jsonrpc": "2.0", "params": {"instructions": {"1.112173851": [{"limitOrder": {"size": 2.0, "price": 5.6, "persistenceType": "LAPSE"}, "orderType": "LIMIT", "side": "BACK", "selectionId": 18}]}, "marketId": "1.112173851", "customerRef": "bbeeOrder"}}'

      The value 1.112173851 is marketId.

      Is there anything else I'm doing wrong?

      M.

      Comment

      • betdynamics
        Junior Member
        • Sep 2010
        • 534

        #4
        Yes - I realise it was the marketId, but why is it there? There is no marketId in the "instructions" part of the request.

        The marketId is specified in the main placeOrders part of the request (as you have done later on), but it should NOT be specified in the instructions part of the request.

        Comment

        • marcinoski
          Junior Member
          • Jun 2014
          • 4

          #5
          Thanks, that fixed it.
          Instructions is a list not a dictionary.

          M.

          Comment

          Working...
          X