Sending Multiple Orders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BigSprout
    Junior Member
    • Feb 2011
    • 60

    #1

    Sending Multiple Orders

    I am having a problem sending multiple place orders, if I send the orders individually I get a "success" response, but when I put them together I get a " -32602" error (Problem parsing the parameters, or a mandatory parameter was not found).


    This is 2 orders sent separately:
    Code:
    {"jsonrpc":"2.0","method":"SportsAPING/v1.0/placeOrders","params":{"marketId":"2.101255430","instructions":[{"selectionId":9172548,"handicap":0.0,"side":"LAY","orderType":"LIMIT","limitOrder":{"size":5.0,"price":1.01,"persistenceType":"LAPSE"}}],"customerRef":"ABC"},"id":1}
    Code:
    {"jsonrpc":"2.0","method":"SportsAPING/v1.0/placeOrders","params":{"marketId":"2.101255430","instructions":[{"selectionId":8564429,"handicap":0.0,"side":"LAY","orderType":"LIMIT","limitOrder":{"size":5.0,"price":1.01,"persistenceType":"LAPSE"}}],"customerRef":"DEF"},"id":1}


    This is the request sent for the 2 orders as a multiple place order request, I get the -32602 from this:
    Code:
    {"jsonrpc":"2.0","method":"SportsAPING/v1.0/placeOrders","params":{"marketId":"2.101255430","instructions":[{"selectionId":9172548,"handicap":0.0,"side":"LAY","orderType":"LIMIT","limitOrder":{"size":5.0,"price":1.01,"persistenceType":"LAPSE"}},{"selectionId":8564429,"handicap":0.0,"side":"LAY","orderType":"LIMIT","limitOrder":{"size":5.0,"price":1.01,"persistenceType":"LAPSE"}}],"customerRef":"XYZ"},"id":1}
    If someone could show me where the error is it would be much appreciated

    cheers Les
  • BigSprout
    Junior Member
    • Feb 2011
    • 60

    #2
    Reading my post, I may have been a little too cryptic, so for a fuller explanation:

    I have been sending individual orders which have been successful, but when I tried entering more than one "instruction" to a request I received the error.

    If my single instruction is sent in a request, these are a SUCCESS:
    request_1
    "instructions":[{"selectionId":9172548,"handicap":0.0,"side":"LAY" ,"orderType":"LIMIT","limitOrder":{"size":5.0,"pri ce":1.01,"persistenceType":"LAPSE"}}]

    request_2
    "instructions":[{"selectionId":8564429,"handicap":0.0,"side":"LAY" ,"orderType":"LIMIT","limitOrder":{"size":5.0,"pri ce":1.01,"persistenceType":"LAPSE"}}]



    I thought by including both the orders in the one instruction as a multiple place order, all I needed to separate the orders was by using a comma, as such:
    "instructions":[
    {"selectionId":9172548,"handicap":0.0,"side":"LAY" ,"orderType":"LIMIT","limitOrder":{"size":5.0,"pri ce":1.01,"persistenceType":"LAPSE"}},
    {"selectionId":8564429,"handicap":0.0,"side":"LAY" ,"orderType":"LIMIT","limitOrder":{"size":5.0,"pri ce":1.01,"persistenceType":"LAPSE"}}
    ]

    My question is - how do you add multiple orders to the one request?
    I have removed the front and rear end of the Json request for clarity, actual Json Request are as per my original post.

    These are examples only

    cheers

    Comment

    • BigSprout
      Junior Member
      • Feb 2011
      • 60

      #3
      Human Error due to finger troubles

      Finally found my error,
      When automating my multiple Place Order requests, I had used "Lay" instead of "LAY", so my system worked on manual but not on automatic.

      My problem was in my haste to display my Json requests/response, I had used copy/paste of the manual (good) orders.

      All is good now.

      My apologies to any inconvenience caused with ppl trying to locate a fault.

      Cheers (will now go and crawl back into my hole)

      Comment

      Working...
      X