Announcement

Collapse
No announcement yet.

Example Order Responses

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

  • Example Order Responses

    Hi all, Ive been working on automated bet placing script to place orders at certain odds, times etc and record the dictionary/json responses throughout. Ive tried to implement as much as possible before running and placing actual money on the exchange but am wary of the fact I have been unable to find documentation of all the response types I have programmed to handle. For instance the offline & online documentation does not include examples of responses from the api for replaceOrder response.

    I was therefore wondering if anyone can point me towards an actual example of the following responses or just paste an example they have of one below:
    - replaceOrder response
    - cancelOrder response
    - updateOrder response

    Additionally does replacing a bet result in a new betId being created?

    Any help is greatly appreciated, thank you all.

  • #2
    Code:
    {"method":"SportsAPING/v1.0/replaceOrders","params":{"marketId":"1.171424504", "instructions":[{"betId":"205518303357","newPrice":1.03}]}}
    {"jsonrpc":"2.0","result":{"status":"SUCCESS","mar ketId":"1.171424504","instructionReports":[{"status":"SUCCESS","cancelInstructionReport":{"st atus":"SUCCESS","instruction":{"betId":"2055183033 57"},"sizeCancelled":2.0,"cancelledDate":"2020-07-16T12:53:23.000Z"},"placeInstructionReport":{"stat us":"SUCCESS","instruction":{"selectionId":1300822 8,"limitOrder":{"size":2.0,"price":1.03,"persisten ceType":"LAPSE"},"orderType":"LIMIT","side":"LAY"} ,"betId":"205518459934","placedDate":"2020-07-16T12:53:23.000Z","averagePriceMatched":0.0,"sizeM atched":0.0,"orderStatus":"EXECUTABLE"}}]}}
    
    {"method":"SportsAPING/v1.0/updateOrders","params":{"marketId":"1.171424504"," instructions":[{"betId":"205518459934","newPersistenceType":"PERS IST"}]}}
    {"jsonrpc":"2.0","result":{"status":"SUCCESS","mar ketId":"1.171424504","instructionReports":[{"status":"SUCCESS","instruction":{"betId":"205518 303357","newPersistenceType":"PERSIST"}}]}}
    
    {"method":"SportsAPING/v1.0/cancelOrders","params":{"marketId":"1.171424504"," instructions":[{"betId":"205518714803"}]}}
    {"jsonrpc":"2.0","result":{"status":"SUCCESS","mar ketId":"1.171424504","instructionReports":[{"status":"SUCCESS","instruction":{"betId":"205518 714803"},"sizeCancelled":2.0,"cancelledDate":"2020-07-16T12:56:49.000Z"}]}}
    
    {"method":"SportsAPING/v1.0/cancelOrders","params":{"marketId":"1.171424504"," instructions":[{"betId":"205519115773","sizeReduction":1.0}]}}
    {"jsonrpc":"2.0","result":{"status":"SUCCESS","mar ketId":"1.171424504","instructionReports":[{"status":"SUCCESS","instruction":{"betId":"205519 115773","sizeReduction":1.0},"sizeCancelled":1.0," cancelledDate":"2020-07-16T13:01:02.000Z"}]}}

    Comment


    • #3
      Thank you very much this is incredibly helpful. I don't suppose you have answer for the second part regarding new betIds when using the replace order call? Does replacing a bet result in a new betId being created?

      Comment


      • #4
        replaceOrders and updateOrders create a new betId. You can see it in responses.

        Comment

        Working...
        X