COM and UpdateBet

Please post any questions regarding the program here.

Moderator: 2020vision

COM and UpdateBet

Postby kiint » Tue Jun 18, 2013 12:34 am

From what I can see, the updateBet method returns an updated bet object that contains three fields:

newRef: string
resultCode: string
stakeCancelled: double

I've been getting an "INVALID_SIZE" error returned in resultCode. Can anyone tell me what this actually relates to?

I've been trying to use the method to update both odds and stake at thee same time. I pass in the remaining original odds and remaining stake as returned in a betdetail object annd the new odds and stake. Is this valid? can I only update one of these at a time?

Also, when the update has been successful, what is returned in resultCode?

Cheers,
kiint
kiint
 
Posts: 148
Joined: Tue Feb 23, 2010 12:12 am

Postby negapo » Tue Jun 18, 2013 9:36 am

Hi kiint

That's right, you cant update both fields in a call, you have to make it in two calls (i know, the error code is dubious).

For the success message it can be two things, "OK" or "OK_REMAINING_CANCELLED" (you can check the API documentation for more details).
negapo
 
Posts: 179
Joined: Thu Mar 19, 2009 1:17 pm
Location: Porto, Portugal

Postby negapo » Tue Jun 18, 2013 9:38 am

Just to add.

If you want to update the two fields then it's the same as canceling the bet and placing a new one. The number of calls are the same, two, and it's simpler.

If you want to bypass the minimum 2€/£/$ bet that's another story.
negapo
 
Posts: 179
Joined: Thu Mar 19, 2009 1:17 pm
Location: Porto, Portugal

Postby kiint » Tue Jun 18, 2013 11:51 am

Thanks Negapo, that does make sense and now I can cater for it.

I think I'd assumed that BA would take care of it.
I seem to remember putting the code in and thinking that I should test that to see if it was so but I don't think I ever got around to it.

Thanks too for the return codes, by the API documentation, I assume you mean the Betfair API? I must admit that I never thought of looking at this as I sort of assumed that the BA COM functions would set their own and not just pass through the Betfair ones. But again, it does make sense and I think I'd better have a look.

Again, many thanks.

Kiint
kiint
 
Posts: 148
Joined: Tue Feb 23, 2010 12:12 am

Postby peleus » Thu Jun 20, 2013 4:39 pm

negapo wrote:Just to add.

If you want to update the two fields then it's the same as canceling the bet and placing a new one. The number of calls are the same, two, and it's simpler.

If you want to bypass the minimum 2€/£/$ bet that's another story.


Thanks. I'm not looking to update fields but I'll keep this in mind if time comes.
Nothing is coincidence. Image
peleus
 
Posts: 41
Joined: Tue Apr 23, 2013 11:41 pm


Return to Help

Who is online

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