platform.getBalance

Get the balance of AVAX controlled by a given address.

Signature​

platform.getBalance({
    address:string
}) -> {
    balance: string,
    unlocked: string,
    lockedStakeable: string,
    lockedNotStakeable: string,
    utxoIDs: []{
        txID: string,
        outputIndex: int
    }
}
  • address is the address to get the balance of.

  • balance is the total balance, in nAVAX.

  • unlocked is the unlocked balance, in nAVAX.

  • lockedStakeable is the locked stakable balance, in nAVAX.

  • lockedNotStakeable is the locked and not stakable balance, in nAVAX.

  • utxoIDs are the IDs of the UTXOs that reference address.

Example

Request

curl -X POST --data '{
  "jsonrpc":"2.0",
  "id"     : 1,
  "method" :"platform.getBalance",
  "params" :{
      "address":"P-avax1m8wnvtqvthsxxlrrsu3f43kf9wgch5tyfx4nmf"
  }
}' -H 'content-type:application/json;' https://ava-mainnet.blastapi.io/<project-id>/ext/P

Result

{
    "jsonrpc": "2.0",
    "result": {
        "balance": "8662170001",
        "unlocked": "8662170001",
        "lockedStakeable": "0",
        "lockedNotStakeable": "0",
        "utxoIDs": [{
            "txID": "VeiXG2nkXRkbMKE3mabexeZWzR9mpYEiQNLZBj549r9vn1YdD",
            "outputIndex": 0
        }]
    },
    "id": 1
}

Last updated