placeBet API error using COM

Please post any questions regarding the program here.

Moderator: 2020vision

placeBet API error using COM

Postby richardphunt » Fri May 27, 2022 6:52 pm

Hi, been using BA everyday without a problem until today. Using BA version ....49i.

Every bet placed is returning the API error 'CANNOT_ACCEPT_BET'.

Diagnostic log entries around the time of 1 of the failures copied below...

27052022 18:13:49:280: 199587071 unsubbed.
27052022 18:13:49:280: Subscribing market id:199587084
27052022 18:13:49:280: Subscribing all markets
27052022 18:13:49:281: Subscribing to 1 markets. Full market depth:True, Ladder levels:3, Traded volume:True
27052022 18:13:49:340: New market image, id:1.199587084
27052022 18:13:55:866: 199587084 unsubbed.
27052022 18:13:55:866: Subscribing market id:199586504
27052022 18:13:55:867: Subscribing all markets
27052022 18:13:55:867: Subscribing to 1 markets. Full market depth:True, Ladder levels:3, Traded volume:True
27052022 18:13:55:950T0: Error loading silks for market:Haydock 27th May - 18:25 1m3f Hcap, runner:Eclipse De Lunar: System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Betting_Assistant.RefreshSilks.getSilkImageFile(String url, String market, String runner)
27052022 18:13:55:955: New market image, id:1.199586504
27052022 18:17:01:643: Keep alive status: SUCCESS
27052022 18:17:02:084T0: Error loading silks for market:Haydock 27th May - 18:25 1m3f Hcap, runner:Eclipse De Lunar: System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Betting_Assistant.RefreshSilks.getSilkImageFile(String url, String market, String runner)
27052022 18:22:02:070T0: Error loading silks for market:Haydock 27th May - 18:25 1m3f Hcap, runner:Eclipse De Lunar: System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Betting_Assistant.RefreshSilks.getSilkImageFile(String url, String market, String runner)
27052022 18:27:02:150T0: Error loading silks for market:Haydock 27th May - 18:25 1m3f Hcap, runner:Eclipse De Lunar: System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Betting_Assistant.RefreshSilks.getSilkImageFile(String url, String market, String runner)
27052022 18:28:10:896: Bet place error json:{"status":"FAILURE","errorCode":"PERMISSION_DENIED","marketId":"1.199586504","instructionReports":[{"status":"FAILURE","errorCode":"ERROR_IN_ORDER","instruction":{"selectionId":7537608,"handicap":0.0,"limitOrder":{"size":2.7,"price":4.7,"persistenceType":"PERSIST"},"customerOrderRef":"637892665093975882","orderType":"LIMIT","side":"BACK"}}]}
27052022 18:28:10:896: order 0
Object type:PlaceExchBets,Members: handicap:0;betType:0;betCategoryType:0;betPersistenceType:1;marketId:199586504;price:4.7;selectionId:7537608;size:2.7;bspLiability:0;pendingId:2;
Object type:PlaceExchBets,Properties:
27052022 18:28:10:897: Request json: {"marketId":"1.199586504","instructions":[{"orderType":"LIMIT","selectionId":7537608,"customerOrderRef":"637892665093975882","handicap":0,"side":"BACK","limitOrder":{"size":2.7,"price":4.7,"persistenceType":"PERSIST"}}]}
27052022 18:28:10:897: Raw request: {"marketId":"1.199586504","instructions":[{"orderType":"LIMIT","selectionId":7537608,"customerOrderRef":"637892665093975882","handicap":0,"side":"BACK","limitOrder":{"size":2.7,"price":4.7,"persistenceType":"PERSIST"}}]}
27052022 18:28:10:897: Raw response: {"status":"FAILURE","errorCode":"PERMISSION_DENIED","marketId":"1.199586504","instructionReports":[{"status":"FAILURE","errorCode":"ERROR_IN_ORDER","instruction":{"selectionId":7537608,"handicap":0.0,"limitOrder":{"size":2.7,"price":4.7,"persistenceType":"PERSIST"},"customerOrderRef":"637892665093975882","orderType":"LIMIT","side":"BACK"}}]}
27052022 18:28:10:897: doPostData exception:
27052022 18:28:10:897: placeBets error, ref: 0,selection id:7537608, result code:CANNOT_ACCEPT_BET
27052022 18:28:10:897: Bet object:
Object type:PlaceExchBets,Members: handicap:0;betType:0;betCategoryType:0;betPersistenceType:1;marketId:199586504;price:4.7;selectionId:7537608;size:2.7;bspLiability:0;pendingId:2;
Object type:PlaceExchBets,Properties:
27052022 18:28:10:902: RemoteLib invoking betPlaceCallBack0, Bet ref:0, tab index:0, callback count:1
27052022 18:28:59:655T0: Adding market 1m Hcap to auto select queue. Quick pick index:5

Transaction Log ...
ID|Date|Bet Reference|Description|API Response|Response Time (ms)
1|27/05/2022 13:35:35|N/A|Backed @ odds:3.40, stake:10.42 (COM server)|CANNOT_ACCEPT_BET|75
2|27/05/2022 13:35:35|N/A|Backed @ odds:2.60, stake:15.63 (COM server)|CANNOT_ACCEPT_BET|103
3|27/05/2022 14:10:58|N/A|Backed @ odds:4.40, stake:7.35 (COM server)|CANNOT_ACCEPT_BET|71
4|27/05/2022 14:45:35|N/A|Backed @ odds:3.30, stake:10.87 (COM server)|CANNOT_ACCEPT_BET|47
5|27/05/2022 14:57:27|N/A|Backed @ odds:2.88, stake:13.30 (COM server)|CANNOT_ACCEPT_BET|47
6|27/05/2022 15:40:26|N/A|Backed @ odds:3.15, stake:11.63 (COM server)|CANNOT_ACCEPT_BET|60
7|27/05/2022 15:55:16|N/A|Backed @ odds:3.75, stake:9.09 (COM server)|CANNOT_ACCEPT_BET|53
8|27/05/2022 15:55:16|N/A|Backed @ odds:3.80, stake:8.93 (COM server)|CANNOT_ACCEPT_BET|43
9|27/05/2022 15:55:16|N/A|Backed @ odds:3.40, stake:10.42 (COM server)|CANNOT_ACCEPT_BET|49
10|27/05/2022 16:17:38|N/A|Backed @ odds:4.20, stake:7.81 (COM server)|CANNOT_ACCEPT_BET|39

Whats happening here?

Thanks
Richard
richardphunt
 
Posts: 14
Joined: Fri Mar 04, 2016 8:51 am
Location: Bournemouth

Re: placeBet API error using COM

Postby richardphunt » Sat May 28, 2022 8:17 am

On further investigation...

I am running a custom built .Net bot on a Microsoft VPS in a data centre based in London, so the below link may explain the current issue if the server in the cloud is not actually in London or BetFair's interpretation of the IP location is incorrect. The error (below link) suggests the bet order is coming from a location not authorised to place an order of this type.

https://support.developer.betfair.com/h ... ace-a-bet-

Betting Assistant doesn't allow you to proceed after the BetFair login if your server is in a barred location, so it (the error) may well be something to do with the location being OK, but the bet type is not?

I deallocated/restarted the server until I got an IP range quite different from the original IP address, luckily there was still 1 more UK race left and a bet was successfully placed.

Going forward I now need to place a random bet into the market after logging into Betfair using BA because I cannot just rely on a failed login to report the VPS is apparently in a barred location.

Is my conclusion correct??
richardphunt
 
Posts: 14
Joined: Fri Mar 04, 2016 8:51 am
Location: Bournemouth


Return to Help

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 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.

cron