getAccountFunds on AUS Wallet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orcus
    Junior Member
    • Apr 2015
    • 2

    #1

    getAccountFunds on AUS Wallet

    Hi,

    I'm trying to get the getAccountFunds call working for the AUS wallet and just cant seem to get it right. I can get the UK balance fine.

    In my app (which is written in PHP) I submit to the correct endpoint...

    https://api.betfair.com/exchange/account/rest/v1.0/

    With the "api." modified to "api-au." for the AUS request.

    It seems to be the params that are tripping me up.
    If I set the params to...

    $params = ’{“filter":{ "wallet":["UK"] }}’;

    I can get the UK wallet details fine. However if I change "UK" to "AUSTRALIAN" I just get the UK wallet details back again (I've checked the endpoints etc...)

    I also tried the following variations of the parameters which I had seen in other sample apps but they all return with errors (DSC-0008).

    $params = ’{"wallet":["UK"]}’;
    $params = ’{"wallet":"UK"}’;
    $params = ’{wallet:["UK"]}’;
    $params = ’{wallet:"UK"}’;

    I tested it out in the visualiser and it works fine. I can see the AUS wallet details as expected.
    Can anyone point me in the right direction?

    Thanks
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    getAccountFunds does not contain a parameter called "filter" so you are getting the default response - which is always contents of the UK wallet.

    The correct format of the JSON string is:

    {"jsonrpc": "2.0", "method": "AccountAPING/v1.0/getAccountFunds", "params": {"wallet":"AUSTRALIAN"}, "id": 1}

    so you need to ensure that your PHP is producing that outcome and then sending it to the appropriate endpoint.

    Comment

    • orcus
      Junior Member
      • Apr 2015
      • 2

      #3
      Thanks!

      I thought I tried that format but obviously not as it is owrking perfectly now.

      Thanks again

      Comment

      Working...
      X