Best method to check the status of a submitted bet?

Please post any questions regarding the program here.

Moderator: 2020vision

Best method to check the status of a submitted bet?

Postby barnov » Tue Feb 03, 2009 12:25 am

Hi,

I'm in the process of writing some code to submit a Dutch Back Bet, and have got as far as being able to submit the bet having met all my entry criteria and bet calculations, and I'm seeking some advice as to what method is best suited to checking if the bets have been matched or not.

If they are matched, then I'll sit back and let the race run, if not matched, then I'll need to tweak odds (perhaps stake) etc.

Would members advise:

a) using single GetBet COM utility against each Betref
b) using multiple GetBets COM and calculating how many F's (or Us) from the resultant object
c) using a Lookup function against the MyBets tab
d) any other method

And if there is some sample code here in the forum somewhere, perhaps someone could paste a link (or code)

Thanks in advance

Paul (aka BarNov)
barnov
 
Posts: 9
Joined: Tue Jan 06, 2009 11:07 pm
Location: London

Postby GaryRussell » Tue Feb 03, 2009 7:51 am

The matched stake column is sufficient. It is updated on every Excel refresh.
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby barnov » Tue Feb 03, 2009 11:11 pm

Gary - thanks for the reply.

Excellent s/w and full marks for the prompt service/support you provide, not just for this query but across the board.

Should also thank other contributors as well, as I've managed to pick out many of the salient points I need for my own code from posts on the various forums, and have now run this in live mode for 1st time today (and acheived my profit target).

Thanks

Paul
barnov
 
Posts: 9
Joined: Tue Jan 06, 2009 11:07 pm
Location: London

Postby barnov » Mon Apr 27, 2009 5:14 pm

Gary (et al),

As per previous reply, I can now write some simple code to check that the 'stake' & 'matched stake' are equal for each runner that I'm backing, but if there is a difference, I just can't seem to get my head round what to do next.

What I'm trying to do is : -
1) identify how much hasn't been matched
2) update the appropriate trigger cells to re-submit the Back bet for
unmatched portion

I'm assuming that to identify the unmatched amount, I could scan the MyBets sheet for any entries with U in the matched column. But I'm stuck from there.

Any help with the logical steps or sample code would be appreciated.

Thanks in advance

Paul (aka Barnov)
barnov
 
Posts: 9
Joined: Tue Jan 06, 2009 11:07 pm
Location: London

Postby GaryRussell » Mon Apr 27, 2009 5:28 pm

It would be better to use the UPDATE trigger to get the remaining portion matched. When you have identified that there is a partial match and you want to get the rest matched then change the odds column to the required odds and insert UPDATE in the trigger column.
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Mon Apr 27, 2009 5:38 pm

Please be aware when you update a bet a new reference is created so it could still look like the bet is partially matched as the new reference will have a matched stake less than your requested stake column. It is better to determine if the bet is partially matched by checking the bet reference, it will always have P appended if it is partially matched.
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby barnov » Mon Apr 27, 2009 5:48 pm

Thanks for quick reply Gary.

Keeping it simple, would this mean that the following would be the simplest way to resolve the unmatched portion

1) run a 'For each cell' routine against the Q5:X? array
2) check that 'stake' & 'matched stake' are the same
3) if not the same
calculate difference (stake - matched)
enter difference in appropriate S? cell
enter UPDATE in appropriate Q? cell

Am I right in assuming that the BetRef remains the same and that I can totally ignore the MyBets sheet altogether

Apologies for being a pain, but hopefully some other newbies are also benefitting from these questions/answers

Paul (aka Barnov)
barnov
 
Posts: 9
Joined: Tue Jan 06, 2009 11:07 pm
Location: London

Postby GaryRussell » Mon Apr 27, 2009 6:00 pm

1) Run a 'For each cell' routine against the T5:X? array (the bet reference)
2) Check if the reference contains "P" eg. instr(ref,"P")<>0
3) If contains "P" then enter appropriate reduced odds in R? cell and enter UPDATE in Q? cell. There is no need to calculate the unmatched stake.

The bet reference does not remain the same when you use the UPDATE trigger. It's the same as submitting bets through the website, if you update a partially matched bet a new bet reference will be created.
User avatar
GaryRussell
Site Admin
 
Posts: 9695
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

Users browsing this forum: No registered users and 121 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.