Skip to content

getBalance

katz edited this page Aug 26, 2020 · 4 revisions

The getBalance method returns a balance for a specified address. If address is not specified, returns the balance of the first address in the wallet.

Request Format

JSON-RPC

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

Request Details:

Argument Mandatory Description Format
address No Wallet address string

Response Format:

JSON-RPC

 {  
   "jsonrpc":"2.0",
   "id":"test",
   "result":{  
      "lockedAmount":210,
      "availableBalance":110,
	  "lockedDepositBalance":0,
	  "unlockedDepositBalance":0
   }
 }

Response Details:

Argument Description Format
availableBalance Available balance of the specified address uint64
lockedAmount Locked amount of the specified address uint64
lockedDepositBalance Balance of locked deposits uint64
unlockedDepositBalance Unlocked deposit balance that can be withdrawn uint64

Possible Errors:

Clone this wiki locally