Marketplace has launched, further enabling blockchain developers! Learn more

Contents

platform.getBalance RPC method

The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. address - String - The address to get the balance of.

Returns:

  1. balance - String - The total balance, in nAVAX.
  2. unlocked - String - The unlocked balance, in nAVAX.
  3. lockedStakeable - String - The locked stakeable balance, in nAVAX.
  4. lockedNotStakeable - String - The locked and not stakeable balance, in nAVAX.
  5. utxoIDs - [Object] - The IDs of the UTXOs that reference address.
  6. - txID - String

    - outputIndex - int

Code Examples:

const ethers = require("ethers");

(async () => {
  const provider = new ethers.providers.JsonRpcProvider(
    "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/P"
  );
  const params = {
    "address": "P-avax1tnuesf6cqwnjw7fxjyk7lhch0vhf0v95wj5jvy",
  };
  const result = await provider.send("platform.getBalance", params);
  console.log(result);
})();
Ready to get started? Create a free account