Skip to content

Account Asset Information

GET /v2/accounts/{address}/assets/{assetId}?format={format}

Get account information about a given asset.

Given a specific account public key and asset ID, this call returns the account’s asset holding and asset parameters (if either exist). Asset parameters will only be returned if the provided address is the asset’s creator.

Properties

NameTypeDescription
address*stringAn account public key
assetId*numberAn asset identifier
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", assetId: 1234}
const client = new Algodv2( "", "https://testnet-api.algonode.cloud", 443 );
const result = await client.accountAssetInformation(data.address, data.assetId).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 AccountAssetInformationViewer() {
const data = {address: "BMG2OPCDNEVFG5LW4S6GT33PPEWXVJD7XEDLTED4BFWN5M4HXLZNCK3EWY", assetId: 1234}
const query = useAccountAssetInformation(data);
}

Svelte [WIP]

Coming Soon!

Solid [WIP]

Coming Soon!

Vue [WIP]

Coming Soon!

Angular [WIP]

Coming Soon!