The Betfair Sports Exchange tries to match bets against the bets placed by other users as well as equivalent bets where possible. These "virtual" bets follow the rules for cross-matching as outlined in the API documentation
For example, if a customer backs Player A in a tennis match at odds of 2.0, the exchange matches any lay bet at odds of 2.0 or better on Player A. In addition, the Exchange also calculates all possible matches that are equivalent to a lay bet on Player A. So, if a customer backs Player B at odds of 2.0 or better, the Exchange matches it with the back bet on Player A. The Betfair website calculates the possible virtual bets that the Betfair Sports Exchange creates and displays those bets as if they were placed by other customers normally.
In other words, bets displayed on the Betfair website may be actual bets placed by customers, or virtual bets that the website knows the Betfair Sports Exchange will match due to the cross-matching rules. By default, virtual bets are not returned via API-NG when making a request to listMarketBook. However, you can return virtual bets in the response when using API-NG by including the virtualise":"true" in the listMarketBook request e.g. [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.114101556"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"virtualise":"true"}}, "id": 1}]
NOTE: It is important to understand that bets placed through the API are matched in the exact same way as bets placed on the website. In other words, a bet placed through the API is matched with either direct opposite bets or with the virtual bet, if available.
Comments
0 comments
Article is closed for comments.