betfaiR

This function allows bets to be cancelled which were placed via placeOrders

Having logged in using the betfair function and placed any number of bets using the placeOrders function, you may wish to cancel some or all of those bets, the cancelOrders method can help.

usage

arguments

param details
... specific details about bets to cancel, use cancel_inst (see help) function to target specific bets via their id
marketId the unique id for the market in which bets should be cancelled

details

To cancel all unmatched or partially matched bets leave the function params empty, like so:

If you wish to target a specific market then add the relevant marketId to the marketId argument, and to target multiple bets in the same market use cancel_inst, like so:

return

The function should return details about whether the cancellation was successful or not, and if you entered any specific instructions, via the marketId and ... (using the cancel_inst function) params then the response should contain data about the bets cancelled, and size of stake returned. The response can be passed to print and summary for easy to interpret results.