Skip to content

getBalance

AxVultis edited this page Nov 12, 2022 · 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

{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "getBalance",
  "params": {
    "address": "ccx7Sh1w3q9jmrzw3XkKPRBa4ZB8mxp5rH4Rm4cWJgDYNNahMKoEuYxgTfHaWbAYRPdUhEXXEeKeEG7okKGHA8CZ3onHF7W6gc"
  }
}

Request Details:

Argument Mandatory Description Format
address No Wallet address string

Response Format

JSON-RPC

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

Response Details:

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

Possible Errors

  • Object not found - The wallet address does not exist in this container.
  • Invalid address - The input address is not a valid Conceal wallet address.
  • Parse error - Incorrect formatting, JSON, or quotation marks used.
Clone this wiki locally