The getBalance method returns the balance for a specified address or a cumulative balance of all Wallet's addresses.

back to methods summary

note : If address is not specified, returns a cumulative balance of all wallet's addresses.

Input:

ArgumentMandatoryDescriptionFormatExample
address No Valid and existing address in this particular walletstringir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j

Output 1):

ArgumentDescriptionFormatExample
availableBalanceAvailable balance of the specified addressuint64123123
lockedAmountLocked amount of the specified addressuint64123123

Input example:

{  
  "params":{
    "address":"ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"
  },
  "jsonrpc":"2.0",
  "id":"test",
  "method":"getBalance"
}

$ curl -s -X POST -d '{"params":{},"jsonrpc":"2.0","id":"test","method":"getBalance"}' localhost:14101/json_rpc | jq

Output example:

{
  "id": "test",
  "jsonrpc": "2.0",
  "result": {
    "availableBalance": 1000200030004,
    "lockedAmount": 200030004
  }
}

Input example:

{  
  "params":{},
  "jsonrpc":"2.0",
  "id":"test",
  "method":"getBalance"
}

$ curl -s -X POST -d '{"params":{},"jsonrpc":"2.0","id":"test","method":"getBalance"}' localhost:14101/json_rpc | jq

Output example:

{  
  'jsonrpc':'2.0',
  'id':'test',
  'result':{  
     'lockedAmount':93145146837855,
     'availableBalance':101585356893
  }
}

back to methods summary


1)
Amounts are returned as big integer, this means you have to divide by 8 decimal (/100000000