CancelOrders confusion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • McTash
    Junior Member
    • Feb 2010
    • 14

    #1

    CancelOrders confusion

    Hi all,

    Just checking that using the CancelOrders request I should be able to outright cancel an unmatched bet without specifying a size.

    Currently when I try (defining the market id and a CancelInstruction with the bet id but no size) I get an INVALID_BET_SIZE error in the instruction report.

    Am I doing something incorrectly? Is it possible to cancel a bet without specifying the size you wish to cancel?

    Many thanks

    McTash

    EDIT: here is the json

    Calling: SportsAPING/v1.0/cancelOrders With args: {"marketId":"1.110110228","instructions":[{"betId":"28318383804","sizeReduction":0.0}],"customerRef":null}

    Perhaps the size reduction should not be there at all?

    EDIT: Ok that was the problem.

    In case this is useful for anyone else, I have expanded the c# sample code (split it into individual requests suitable for throttling) and implemented a lot of the types that are not present in the sample code. In this case sizeReduction was specified as a double. Changing this to double? (nullable) allowed the serializer to strip the parameter rather than passing it as 0.0 which caused the error.
    Last edited by McTash; 19-07-2013, 03:12 AM.
  • gus
    Senior Member
    • Jan 2009
    • 134

    #2
    Perhaps the size reduction should not be there at all?

    i don't think it should.

    in my test app I just send the marketId and the list of betId(s) to cancelOrders/and it seems to work fine, tho I've probably only used it half-a-dozen times.

    Comment

    • gus
      Senior Member
      • Jan 2009
      • 134

      #3
      ooops, sorry, didn't notice your EDIT

      Comment

      Working...
      X