Skip to main content
Version: 0.3

Get AVT Balance

This page demonstrates how to get the AVT balance of a specific account on the Aventus network.

// replace <acct> with the actual account address
await api.query.getAvtBalance(<acct>);

Example

An example of how you would use this in your code could be:

const AvnApi = require("avn-api");
const GATEWAY = "<node_url>"; //Replace the node_url with the url received from Aventus.
const api = new AvnApi(GATEWAY);

async function main() {
await api.init();

// Return the AVT balance of a specific account
let acctAVTbalance = await api.query.getAvtBalance(<acct>); //replace <acct> with the actual account address
console.log("The AVT balance of an account", acctAVTbalance);
}

(async () => {
await main();
})();

Expected Output

930009105441170202155