Bet placement works in the same way for bets placed via the website or the API. So, if you request a larger price (back bet) than the one currently available your order will remain on the Exchange until matched or canceled (assuming you are placing a keep bet). If you place a bet at lower odds than those available, your bet will be automatically matched if a better price is available due to best execution
The best way to determine the amount of money available at the price requested is to 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 are 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 bet being unmatched once executed. This is equivalent to the bet slider functionality that we use on the Betfair website
We also recommend that you take a look at "fill or kill" and other special bet placement options
Fill or kill would, for example, prevent a bet from remaining on the Exchange if it isn't immediately matched at the price requested.
Comments
0 comments
Article is closed for comments.