Skip to main content
Version: 1.0

Get the Account balance of any ERC20 or ERC777 Token on the Aventus Network

Returns the balance of a specific token for a given AvN account.

await API.query.getTokenBalance(account, TOKEN_ETHEREUM_ADDRESS);

You can get the AVN_GATEWAY_URL here.

const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const options = {
suri: "<account_suri>",
const API = new AVN_API(AVN_GATEWAY_URL, options);

const ACCOUNT = "5DAgx...";
const TOKEN_ETHEREUM_ADDRESS = "0x7e5bb...";

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

let token_balance = await API.query.getTokenBalance(ACCOUNT, TOKEN_ETHEREUM_ADDRESS);

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