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.
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.


Comment