durtal / betfaiR

R package for the Betfair API
http://durtal.github.io/betfaiR/
Other
18 stars 6 forks source link

Cancel_instructions: sizereduction #19

Closed dahlinniclas closed 5 years ago

dahlinniclas commented 5 years ago

Hi,

I have been trying to use the size parameter in the cancel_inst function when using the cancelOrders method but can't get it to cancel part of the bet. Instead it cancels the entire bet. Please see example below:

cancel <- bf$cancelOrders( cancel_inst(size = 35, betId = 158757475816), marketId = "1.156666122" )

summary(cancel) Status: SUCCESS Orders: status betId sizeCancelled cancelledDate SUCCESS 158757475816 65 2019-03-27T15:57:39.000Z

durtal commented 5 years ago

Hi @dahlinniclas,

Sorry about this, hopefully hasn't impacted you too much, I'll try and find time to fix this over the next few days. Thanks for the feedback, appreciated.

Just to follow on from this, I think the fix is relatively simple so will try fix later today - looks like I might just need to change the size parameter in cancel_inst to sizeReduction.

durtal commented 5 years ago

Evening @dahlinniclas

Hopefully this commit has addressed the issue. You'll need to re-install the package to see the change.

Please let me know if you have further issues, be happy to fix things.

dahlinniclas commented 5 years ago

Great! Looks like this will fix it. Will have a look this weekend to see if it works.

Thanks again!