getAccountFunds() often fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mr Magoo
    Junior Member
    • Jan 2011
    • 86

    #1

    getAccountFunds() often fails

    The API seems to be getting much more reliable, but I'm still seeing repeated errors with the getAccountFunds() method.

    It often fails with the error code AANGX-0002, but sometimes DSC-0005, AANGX-0003 and AANGX-0006.

    It happens every day - I can see 10 errors of this kind so far today, for instance. All the errors I've seen have been when communicating with the UK endpoint.

    Does anyone know what the error codes mean, or what the problem might be?
  • monkeymagix
    Junior Member
    • Jul 2010
    • 105

    #2
    I also get this issue a lot

    I am using a BOT I built in C# and I have a Windows Service that checks if the API is up and running every few minutes by ensuring it's logged in and checking the funds.

    Every now and then it will fail and say the funds are unavailable.

    Which then my Service App (stop/start show status/funds) thinks the API is down.

    It seems one of the ropiest parts of the system.

    I am pretty shocked they would swap over a stable SOAP system for a JSON system that had it's release date rolled back time and time again and is still not stable. Surely you would ensure the API worked (side by side development as the SOAP API ran) before releasing it to the public.

    It is a bit like getting the customers to bug test for you.

    Anyway just wanted to say I have noticed this as well.

    Rob

    Comment

    • BetfairDeveloperProgram
      Administrator
      • Oct 2008
      • 679

      #3
      Hi Mr Magoo/monkeymagix,

      The errors suggest that the API has failed to retrieve the data from the underlying Accounts service.

      If you can provide the times of recent failures we can take a look at our logs to investigate why this is happening so frequently.

      Thanks

      Neil

      Comment

      • bnl
        Junior Member
        • Nov 2012
        • 108

        #4
        Here are two variant of the problem.
        The two first gets timeout, that is no reply within 30 seconds.

        The two last are just strange

        All times are CET
        Code:
        2015-08-19 09:25:28.352 RPC.Get_JSON_Reply : posting: 
        {
        	"method": "AccountAPING/v1.0/getAccountFunds",
        	"jsonrpc": "2.0",
        	"id": 15,
        	"params": {
        		
        	}
        }
        2015-08-19 09:25:58.429 RPC.Get_JSON_Reply : Got reply, check it 
        2015-08-19 09:25:58.429 RPC.Get_JSON_Reply : Post Timeout -> Give up!
        2015-08-19 09:25:58.429 RPC.POST_TIMEOUT
        2015-08-19 09:25:58.429 Message : rpc.adb:198
        2015-08-19 09:25:58.429 Exception name: RPC.POST_TIMEOUT
        
        --------------------
        
        2015-08-19 09:41:05.647 RPC.Get_JSON_Reply : posting:{
        	"method": "AccountAPING/v1.0/getAccountFunds",
        	"jsonrpc": "2.0",
        	"id": 15,
        	"params": {
        		
        	}
        }2015-08-19 09:41:35.726 RPC.Get_JSON_Reply : Got reply, check it 
        2015-08-19 09:41:35.726 RPC.Get_JSON_Reply : Post Timeout -> Give up!
        2015-08-19 09:41:35.726 RPC.POST_TIMEOUT
        2015-08-19 09:41:35.726 Message : rpc.adb:198
        2015-08-19 09:41:35.726 Exception name: RPC.POST_TIMEOUT
        
        --------------------
        
        2015-08-19 10:32:41.129 RPC.Get_JSON_Reply : Got reply: {
        	"id": 15,
        	"jsonrpc": "2.0",
        	"error": {
        		"code": -32099,
        		"data": {
        			"AccountAPINGException": {
        				"requestUUID": "prdaan-2882a1-08180826-0000894628",
        				"errorCode": "UNEXPECTED_ERROR",
        				"errorDetails": ""
        			},
        			"exceptionname": "AccountAPINGException"
        		},
        		"message": "AANGX-0003"
        	}
        }2015-08-19 10:32:41.129 RPC. : error.code -32099
        2015-08-19 10:32:41.129 RPC. : APINGException.errorCode UNEXPECTED_ERROR
        2015-08-19 10:32:41.129 RPC. : Error.Message AANGX-0003
        
        
        --------------------
        
        2015-08-19 11:21:19.223 RPC.Get_JSON_Reply : Got reply: {
        	"id": 15,
        	"jsonrpc": "2.0",
        	"error": {
        		"code": -32099,
        		"data": {
        			"AccountAPINGException": {
        				"requestUUID": "prdaan002-08180805-00008fd4fa",
        				"errorCode": "UNEXPECTED_ERROR",
        				"errorDetails": ""
        			},
        			"exceptionname": "AccountAPINGException"
        		},
        		"message": "AANGX-0003"
        	}
        }2015-08-19 11:21:19.223 RPC. : error.code -32099
        2015-08-19 11:21:19.223 RPC. : APINGException.errorCode UNEXPECTED_ERROR
        2015-08-19 11:21:19.223 RPC. : Error.Message AANGX-0003

        /Björn

        Comment

        • bnl
          Junior Member
          • Nov 2012
          • 108

          #5
          forgot so say that all 4 POST()s were like
          Code:
          {
          	"method": "AccountAPING/v1.0/getAccountFunds",
          	"jsonrpc": "2.0",
          	"id": 15,
          	"params": {
          		
          	}
          /Björn

          Comment

          • BetfairDeveloperProgram
            Administrator
            • Oct 2008
            • 679

            #6
            Thanks Björn, we'll take a look and get back to you.

            Neil

            Comment

            • BetfairDeveloperProgram
              Administrator
              • Oct 2008
              • 679

              #7
              Hi Björn,

              These errors "UNEXPECTED_ERROR ANGX-0003" were caused by a timeout between the API and the underlying services.

              Investigations into why this is happening are ongoing.

              Thanks

              Neil

              Comment

              • bnl
                Junior Member
                • Nov 2012
                • 108

                #8
                Originally posted by Betfair Developers Program View Post
                Hi Björn,

                These errors "UNEXPECTED_ERROR ANGX-0003" were caused by a timeout between the API and the underlying services.

                Investigations into why this is happening are ongoing.

                Thanks

                Neil
                OK, thanks for the update
                /Björn

                Comment

                • Mr Magoo
                  Junior Member
                  • Jan 2011
                  • 86

                  #9
                  Sorry for taking so long to reply to your request for more information.

                  Yesterday (24/8) I saw getAccountFunds fail at 07:58:38 and 08:49:25. Both gave an error code of AANGX-0002.
                  Last edited by Mr Magoo; 25-08-2015, 01:21 PM. Reason: Corrected the times (they are BST)

                  Comment

                  • BetfairDeveloperProgram
                    Administrator
                    • Oct 2008
                    • 679

                    #10
                    Thanks Mr Magoo.

                    Can you also provide the "requestUUID" returned with the error? As this will help us to identify the failing server?

                    Thanks

                    Neil

                    Comment

                    • Mr Magoo
                      Junior Member
                      • Jan 2011
                      • 86

                      #11
                      Sorry, I haven't got that information logged.

                      I've now added better instrumentation to record the full response, so I'll post a message when I see the error again.

                      Comment

                      • Mr Magoo
                        Junior Member
                        • Jan 2011
                        • 86

                        #12
                        So, after logging all of the error responses, I've found out that the problem is actually all my own fault!

                        Here's the response from a failed getAccountFunds call from this morning:
                        Code:
                        'jsonrpc' => '2.0',
                        'error' => {'code' => -32099,
                                    'data' => {'exceptionname' => 'AccountAPINGException',
                                               'AccountAPINGException' => {'errorDetails' => '',
                                                                           'requestUUID' => 'null',
                                                                           'errorCode' => 'INVALID_SESSION_INFORMATION'
                                                                          }
                                              },
                                    'message' => 'AANGX-0002'
                                   },
                        'id' => '1234'
                        the INVALID_SESSION_INFORMATION is most likely because of a bug on my part, failing to call keepalive from this particular program. Annoyingly, the code is meant to spot this and relogin, but clearly that didn't work either! Oh well, back to bugfixing my code... sorry for the wild goose chase!

                        Actually, one more thing. Might be another wild goose chase though: The extra error logging caught another strange error, this time from listMarketBook on the AUS exchange. This failed with UNEXPECTED_ERROR:

                        Code:
                        'jsonrpc' => '2.0',
                        'error' => { 'code' => -32099,
                                     'data' => {'exceptionname' => 'APINGException',
                                                'APINGException' => {'errorCode' => 'UNEXPECTED_ERROR',
                                                                     'requestUUID' => 'prdang023-06220236-00125567ce',
                                                                     'errorDetails' => ''
                                                                    }
                                               },
                                     'message' => 'ANGX-0006'
                                   },
                        'id' => '1234'
                        Not sure what caused this, I don't see many UNEXPECTED_ERRORs. Unfortunately I haven't got logs of what the actual request was here, so this bug report may not be of great use...

                        Comment

                        • Grantay.
                          Junior Member
                          • Jan 2010
                          • 53

                          #13
                          Errors on the Aus Exchange

                          Mr Magoo

                          If you unexpected errors happened yesterday afternoon (Australian time) they were errors at the BF end - my app was crashing all over the place - but only for a few seconds - Market calls would fail, then on the next call work fine.

                          I even saw a few 500 errors on the website during this period.

                          grantay

                          Comment

                          • Mr Magoo
                            Junior Member
                            • Jan 2011
                            • 86

                            #14
                            Yeah, I've seen a few problems over the last couple of days. Mostly though, the API has been getting more reliable.

                            Comment

                            • BetfairDeveloperProgram
                              Administrator
                              • Oct 2008
                              • 679

                              #15
                              Hi Björn

                              The timeout issues experienced on 19th Aug were caused by the Trading DB. After a short interval the service started to work as expected.

                              Kind Regards

                              Neil

                              Comment

                              Working...
                              X