Nexus

How do I read an Algorand asset's name, unit name and decimals?

Short answer: Call algod.getAssetByID(assetId) and read params.

Code that was run

// algod = new algosdk.Algodv2("", "https://testnet-api.algonode.cloud", 443)
// indexer, addr (an account address) and USDC (asset id 10458941 on TestNet) are set up before the call
async () => {
    const a = await algod.getAssetByID(USDC).do();
    return { name: a.params.name, unitName: a.params.unitName, decimals: a.params.decimals };
  }

What it returned

{
  "name": "USDC",
  "unitName": "USDC",
  "decimals": 6
}

Run against a public TestNet node with algosdk 3.9.0 on 2026-12-03. Amounts are shown as strings because they are bigints.

Notes

All how-tos · howto.json · SDK errors · API errors · costs