Announcement

Collapse
No announcement yet.

Error 'DSC-0018'/-32602

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error 'DSC-0018'/-32602

    Hi there,

    I send requests for placing orders in-running, and occasionally, but not always.
    One example is this, where I have parameters

    {'marketId': '1.171174652', 'instructions': [{'selectionId': '9292000', 'side': 'lay', 'orderType': 'LIMIT', 'limitOrder': {'size': '2.67', 'price': '2.56', 'persistenceType': 'LAPSE', 'timeInForce': 'FILL_OR_KILL', 'minFillSize': '2'}}]}

    and get a return of
    {'jsonrpc': '2.0', 'error': {'code': -32602, 'message': 'DSC-0018'}, 'id': 1}

    Any idea why this is, and why it happens only some times?

    Thanks!

  • #2
    I don't know why it sometimes works and sometimes doesn't. However, the value for the side parameter should be in upper case.

    Comment


    • #3
      Thanks, I'll try that!

      Comment


      • #4
        selectionId is Long. size, price and minFillSize are Double.
        Correct request string:
        Code:
        {'marketId':'1.171174652','instructions':[{'selectionId':9292000,'side':'LAY','orderType':'LIMIT','limitOrder':{'size':2.67,'price':2.56,'persistenceType':'LAPSE','timeInForce':'FILL_OR_KILL','minFillSize':2}}]}

        Comment


        • #5
          Originally posted by WTPooh View Post
          selectionId is Long. size, price and minFillSize are Double.
          Correct request string:
          Code:
          {'marketId':'1.171174652','instructions':[{'selectionId':9292000,'side':'LAY','orderType':'LIMIT','limitOrder':{'size':2.67,'price':2.56,'persistenceType':'LAPSE','timeInForce':'FILL_OR_KILL','minFillSize':2}}]}
          Numbers with quotes around them are accepted. A problem can arise when a market id ends in zero and is written as numeric. If the market id ends in zero, the zero is lost and then the market id doesn't match any actual market id.

          DSC-0018 denotes a missing parameter.

          Comment

          Working...
          X