COM PlaceBet

Please post any questions regarding the program here.

Moderator: 2020vision

COM PlaceBet

Postby colinbest2 » Thu Feb 20, 2025 5:41 pm

I'm using the placeBet functionality of the COM and the first parameter to provide is the index of the horse im placing the bet on. The horse at the top of the list being 0, next being 1. However I'm sometimes seeing bets being placed on the wrong horses despite the index being correct. Today a successful bet was placed at index 3 for the right horse, then I placed a bet on the horse at index 4, but the bet was placed on the horse at index 5. Any ideas what could cause this? Is there a better way to place bets? Using selectionId for example?
colinbest2
 
Posts: 6
Joined: Thu Feb 20, 2025 5:38 pm

Re: COM PlaceBet

Postby colinbest2 » Thu Feb 20, 2025 5:51 pm

To add some more context I'm waiting for a market to go inplay then placing multiple bets straight away. Could horses be reordering at inplay?
colinbest2
 
Posts: 6
Joined: Thu Feb 20, 2025 5:38 pm

Re: COM PlaceBet

Postby colinbest2 » Fri Feb 21, 2025 2:46 pm

I have attached some screenshots as an example. You'll see the indexes being used by the bot are as shown on by Betfair. However the bet was placed on Lucky So And So and not Siberian Star? The code to do this just uses getPrices and the order the horses are returned from that.
Attachments
Screenshot 2025-02-21 134406.png
The indexes being used by the COM
Screenshot 2025-02-21 134406.png (48.25 KiB) Viewed 8880 times
Screenshot 2025-02-21 134212.png
What happened
Screenshot 2025-02-21 134212.png (165.45 KiB) Viewed 8880 times
colinbest2
 
Posts: 6
Joined: Thu Feb 20, 2025 5:38 pm

Re: COM PlaceBet

Postby Captain Sensible » Fri Feb 21, 2025 3:36 pm

If you've switched markets between bets then it's quite possible the order has changed. Using selectionID will ensure all bets placed on that selection only
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: COM PlaceBet

Postby colinbest2 » Fri Feb 21, 2025 3:43 pm

Ah so it’s possible to use selectionId? The docs say to use the index.
colinbest2
 
Posts: 6
Joined: Thu Feb 20, 2025 5:38 pm

Re: COM PlaceBet

Postby colinbest2 » Fri Feb 21, 2025 4:05 pm

Just tried using selectionId instead of an index and placeBet returns "E" so unless theres something else that needs doing differently to use selectionId I don't think its supported.
colinbest2
 
Posts: 6
Joined: Thu Feb 20, 2025 5:38 pm

Re: COM PlaceBet

Postby GaryRussell » Fri Feb 21, 2025 4:24 pm

The order of the market never changes unless you change market and back again. There is currently no way to pass the selection id to place the bet.

The Price object does contain a property named selectionId though. You could create a function that calls getPrices and loops through the selections to find the corresponding index just before you place the bet.
User avatar
GaryRussell
Site Admin
 
Posts: 9867
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: COM PlaceBet

Postby colinbest2 » Fri Feb 21, 2025 4:33 pm

Think I’ve figured it out. I realised I was iterating through MarketDepth not prices. Since I’ve changed it to iterate through getPrices and place the bets based on that index it’s not had any dodgy bets.
colinbest2
 
Posts: 6
Joined: Thu Feb 20, 2025 5:38 pm

Re: COM PlaceBet

Postby GaryRussell » Fri Feb 21, 2025 4:36 pm

Yes, that will be why. Should be ok now.
User avatar
GaryRussell
Site Admin
 
Posts: 9867
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 27 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.