How to identify missing parameter on placeOrder?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mojovski2
    Junior Member
    • Sep 2015
    • 4

    #1

    How to identify missing parameter on placeOrder?

    Hey guys,
    I am trying to place an order via the API but receive a message that some of the required parameters is missing.
    Here is what I send:
    {'params': {'instructions': [{'orderType': 'LIMIT', 'selectionId': 4030151.0, 'side': 'BACK', 'limitOrder': {'persistenceType': 'LAPSE', 'price': 100.5, 'size': 3.0}}], 'marketId': 1.120831103}, 'jsonrpc': '2.0', 'method': 'SportsAPING/v1.0/placeOrders', 'id': 1}
    And here is the response:
    {u'jsonrpc': u'2.0', u'id': 1, u'error': {u'message': u'DSC-0018', u'code': -32602}}
    As far the docs about placeOrder tell, I filled out the required fields.

    What do I miss?

    Thanks alot in advance!
  • ForeTwo
    Junior Member
    • Apr 2011
    • 15

    #2
    This bet is failing on selectionId (needs to be an int, not float).

    It would then fail on an invalid price (incorrect increment).

    Comment

    • mojovski2
      Junior Member
      • Sep 2015
      • 4

      #3
      Originally posted by ForeTwo View Post
      This bet is failing on selectionId (needs to be an int, not float).

      It would then fail on an invalid price (incorrect increment).
      Thank you!

      Actually, I still dont get how the price increments work. Is there some explanation out there?

      Comment

      • jptrader
        Junior Member
        • Nov 2009
        • 82

        #4
        https://api.developer.betfair.com/se...ice+Increments

        Comment

        • mojovski2
          Junior Member
          • Sep 2015
          • 4

          #5
          Sorry, still have difficulties to place an order.

          I call now
          https://gist.github.com/mojovski/fbd99d3b8c0404479401

          And receive no exception, but a response like this:
          https://gist.github.com/mojovski/d533c83ca3942d8221bc


          The market data details can be found here:
          https://gist.github.com/mojovski/c87be771a56dd53a7121

          What do I miss here?
          Last edited by mojovski2; 12-10-2015, 12:32 AM. Reason: replaced raw code by links to gist

          Comment

          Working...
          X