The 'Cashout' functionality isn't available via the API as an operation.
However, the generic algorithm for both standard cash out and partial cashout is available via https://betcalcul.com/calculator/cash-out/full/
To improve the accuracy of your cash-out calculation, you can use the exBestOffersOverrides "rollupMode and "rollupLimit" within the listMarketBook request. This will allow you to return prices that are available based on the rollupLimit criteria. For example, the below example will roll up the returned results to return prices where there is at least £100 available to back or lay.
{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.169592222"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"virtualise":"true","exBestOffersOverrides":{"rollupModel":"STAKE","rollupLimit":"100"}}}, "id": 1}]
This will reduce the chance of any cashout bet being unmatched once executed & should, in most cases, ensure that you receive a better cash-out position than you originally calculated (rather than a worse one). This is equivalent to the bet slider functionality that we use on the Betfair website see further info via https://support.betfair.com/app/answers/detail/a_id/405/
Comments
0 comments
Article is closed for comments.