Skip to content

Account Information

GET /v2/accounts/{address}?format={format}&exclude={exclude}

Get account information.

Given a specific account public key, this call returns the accounts status, balance and spendable amounts

Properties

NameTypeDescription
address*stringAn account public key
exclude"all" | "none"When set to all will exclude asset holdings, application local state, created asset parameters, any created application parameters. Defaults to none.
format"json" | "msgpack"Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.

* indicates required property

Packages

Node.js

Install

Terminal window
npm install algosdk --save

Usage

import { Algodv2 } from "algosdk";
const data = {address: "BMG2OPCDNEVFG5LW4S6GT33PPEWXVJD7XEDLTED4BFWN5M4HXLZNCK3EWY"}
const client = new Algodv2( "", "https://testnet-api.algonode.cloud", 443 );
const result = await client.accountInformation(data.address).do();

React

Install

Terminal window
npm install @awesome-algorand/react-query @txnlab/use-wallet-react @tanstack/react-query algosdk --save

Usage

import { useAccountAssetInformation } from '@awesome-algorand/react-query';
export function AccountInformationViewer() {
const data = {address: "BMG2OPCDNEVFG5LW4S6GT33PPEWXVJD7XEDLTED4BFWN5M4HXLZNCK3EWY"}
const query = useAccountInformation(data);
}

Svelte [WIP]

Coming Soon!

Solid [WIP]

Coming Soon!

Vue [WIP]

Coming Soon!

Angular [WIP]

Coming Soon!