Log in
Menu

How to Check a USDT TRC-20 Balance via API: Three Ways Compared

Read a USDT TRC-20 balance with balanceOf, the TronGrid account endpoint or the TronScan API. Real responses, unit conversion and a timed freshness test.

Category
Guides
Published
Reading time
8 min

To check a USDT TRC-20 balance via API, call the contract’s balanceOf(address) through wallet/triggerconstantcontract on a TRON node, or read the trc20 field of TronGrid’s /v1/accounts/{address}. Both return an integer in units of 0.000001 USDT, so divide by 1,000,000 (as a string or BigInt, not a float). The TronScan API is a third option, but it needs an API key: without one it answered 401 on Nov 23, 2026.

Below: each method on a real address, what the responses look like, which one sees a new transfer first (we timed it), and a short node script we ran on Nov 23, 2026.

The three methods at a glance

Method Request What you get Freshness Key
balanceOf via the node POST /wallet/triggerconstantcontract one 32-byte hex word latest block not needed on TronGrid at low volume
Same, confirmed state POST /walletsolidity/triggerconstantcontract same word solidified block, about a minute behind same
TronGrid account data GET /v1/accounts/{address} TRX balance, resources and a trc20 list of every token saw a new transfer before it was confirmed same
TronScan API GET /api/account/tokens token list with balances indexer, timing not measured required (TRON-PRO-API-KEY)

The first two read the contract’s storage directly. The third is TronGrid’s own account view, and the fourth is the explorer’s database. Which contract is the real USDT, and why its address is the only reliable identifier, is covered in the USDT TRC-20 contract address.

Our test address is TKHuVq1oKVruCGLvqVexFs6dawKv6fQgFs. It is not a private wallet: the address returned by the USDT contract’s owner() function sends newly issued USDT to it in batches of 1,000,000,000 USDT, for example this transfer on Aug 21, 2026.

Method 1: call balanceOf through triggerconstantcontract

triggerconstantcontract runs a read-only function on a node and returns the result without creating a transaction. Nothing is signed and nothing is paid. The request body for our address:

{
  "owner_address": "TKHuVq1oKVruCGLvqVexFs6dawKv6fQgFs",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "function_selector": "balanceOf(address)",
  "parameter": "00000000000000000000000066426c7ac3d98b29191063833345b6bc540d7278",
  "visible": true
}

The parameter is the address in hex without the 41 prefix, padded to 32 bytes. visible: true lets you pass the two base58 addresses as they are, but the parameter itself stays hex. On Nov 23, 2026 at 06:04 UTC the answer contained:

  • constant_result[0]: ...00092edc4abdaaab, which is 2,584,798,472,022,699 units, or 2,584,798,472.022699 USDT;
  • energy_used: 4,062. This is what the call would cost inside a transaction; a constant call burns nothing.

Send the same body to /walletsolidity/triggerconstantcontract and the node runs the call on the last confirmed (solidified) block instead of the newest one. For our address both returned the same number, because nothing had moved in the last minute. The difference shows up on an address that has just received a transfer; see the test below.

Method 2: the trc20 field of /v1/accounts

GET https://api.trongrid.io/v1/accounts/TKHuVq1oKVruCGLvqVexFs6dawKv6fQgFs returns one object with the whole account. Three things in the answer of Nov 23, 2026 matter here:

  1. balance: 87,503,501,149. This is TRX in SUN, so 87,503.501149 TRX, not USDT.
  2. trc20: a list of 171 single-key objects, {"contract address": "balance"}. Only one entry is USDT: the contract TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t maps to the string 2584798472022699.
  3. The balance is a string of units, the same 2,584,798,472,022,699 that balanceOf returned.

The 170 other entries are tokens that anyone can send to any address, including ones named like stablecoins. Filter by the contract address, never by a symbol or position in the list. If an activated address has no USDT entry, the script below returns 0.

One catch: this endpoint reads the TRON account, and an address that has never received TRX has no account yet, while its USDT sits in the contract’s storage. On Nov 23, 2026 we saw exactly that on a non-activated address: wallet/getaccount returned {}, /v1/accounts an empty data list, and balanceOf a balance of 400 USDT. An empty answer is not a zero balance; the script below returns null for it.

The same object also carries resource fields (account_resource, frozenV2); reading them is covered in getaccountresource explained.

Method 3: the TronScan API

TronScan’s documentation lists GET https://apilist.tronscanapi.com/api/account/tokens?address=... for an account’s token list and says the mainnet API requires a key in the TRON-PRO-API-KEY header. Our request without a key on Nov 23, 2026 at 06:00 UTC got HTTP 401. With a key it works, but it adds an account with the explorer and a dependency on its indexer, so for a single balance the two node methods above are simpler. For reading one address by eye, the TronScan website itself needs no key.

Freshness: one transfer, three answers

To see which source updates first, we took a USDT transfer of 1,199 USDT from the newest block, 6441b840…4277 in block 88,246,576 (Nov 23, 2026, 06:04:51 UTC), and asked for the recipient’s balance with a pause of about 5 seconds between requests.

Request Time after the block Balance, USDT
/wallet balanceOf 10 s 1,199.255539 (transfer included)
/walletsolidity balanceOf 16 s 0.255539 (not yet)
/v1/accounts trc20 22 s 1,199.255539
/v1/accounts?only_confirmed=true 27 s 1,199.255539
/walletsolidity balanceOf, again 79 s 1,199.255539

At 33 seconds walletsolidity/getnowblock returned block 88,246,566, ten blocks behind our transfer, and at 95 seconds 88,246,587, past it. Two conclusions from this one test:

  • /wallet and /v1/accounts show a transfer as soon as it is in a block, before it is confirmed. The only_confirmed parameter did not change the account answer.
  • /walletsolidity lags by about 20 blocks, roughly a minute. Use it when a balance decides something irreversible, like releasing goods or a payout. Why confirmation takes that long is explained in how long a USDT TRC-20 transfer takes.

A short script, tested on real data

Illustrative example, check the exact format in the TronGrid reference. We ran it in node on Nov 23, 2026; it printed 2584798472.022699 three times.

// illustrative example: USDT TRC-20 balance of one address, two ways
const USDT = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t';
const API = 'https://api.trongrid.io';
const B58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';

// base58 address -> 20-byte hex (drops the 41 prefix and the checksum, does not verify it)
function toHex20(addr) {
  let n = 0n;
  for (const ch of addr) n = n * 58n + BigInt(B58.indexOf(ch));
  return n.toString(16).padStart(50, '0').slice(2, 42);
}
// units of 0.000001 USDT -> decimal string, no floating point
const fmt = (u) => { const s = u.toString().padStart(7, '0'); return `${s.slice(0, -6)}.${s.slice(-6)}`; };

// 1) the contract itself: base 'wallet' = latest block, 'walletsolidity' = confirmed state
async function balanceOf(addr, base = 'wallet') {
  const res = await fetch(`${API}/${base}/triggerconstantcontract`, {
    method: 'POST',
    headers: { 'content-type': 'application/json' },
    body: JSON.stringify({ owner_address: addr, contract_address: USDT, visible: true,
      function_selector: 'balanceOf(address)', parameter: toHex20(addr).padStart(64, '0') }),
  });
  const j = await res.json();
  return BigInt('0x' + j.constant_result[0]);
}

// 2) TronGrid account data: trc20 is a list of { contractAddress: "balance in units" }
async function trc20Field(addr) {
  const j = await (await fetch(`${API}/v1/accounts/${addr}`)).json();
  if (!Array.isArray(j.data)) throw new Error('TronGrid: ' + JSON.stringify(j)); // e.g. rate limit
  if (!j.data.length) return null; // account not activated: may still hold USDT, ask balanceOf
  const hit = (j.data[0].trc20 ?? []).find((o) => o[USDT] !== undefined);
  return hit ? BigInt(hit[USDT]) : 0n;
}

const addr = 'TKHuVq1oKVruCGLvqVexFs6dawKv6fQgFs';
const pause = () => new Promise((ok) => setTimeout(ok, 6000));
console.log('wallet        ', fmt(await balanceOf(addr)));       await pause();
console.log('walletsolidity', fmt(await balanceOf(addr, 'walletsolidity'))); await pause();
console.log('v1 trc20      ', fmt(await trc20Field(addr)));

The decoder skips the checksum on purpose, to stay short; validate user input first, as shown in TRON address format validation.

Converting units without losing digits

Why BigInt and strings: JavaScript numbers are exact only up to 9,007,199,254,740,991. The USDT totalSupply() on Nov 23, 2026 was 94,207,320,125,300,667 units. As a Number that becomes 94,207,320,125,300,670, and dividing by 1e6 prints 94207320125.30067: the last digit is gone. A single balance of that size is unlikely, but sums across many addresses get there fast. Keep units as BigInt, add them as BigInt, and format only for display, as in fmt above. More on the 6 decimals is in the minimum USDT TRC-20 amount.

Which method to use

  1. One address, current value: balanceOf on /wallet. One small request, the answer is the contract’s own storage.
  2. A decision that cannot be undone: the same call on /walletsolidity, or wait for confirmation.
  3. TRX and tokens in one request: /v1/accounts/{address}, then pick USDT by contract address.
  4. Many addresses or a history of incoming payments: do not poll balances in a loop; read transfers instead, see monitoring incoming USDT.
  5. Keep a low request rate on public endpoints, and parse every amount as an integer.

For moving USDT out after you have checked a balance, energy can be ordered from your own system through the API.

FAQ

Is checking a USDT balance through the API free? Yes for the two node methods: triggerconstantcontract and /v1/accounts create no transaction and burn nothing. The TronScan API needs a key from a TronScan account.

Why is the balance a huge integer? USDT on TRON has 6 decimals, so the contract stores units of 0.000001 USDT. Divide by 1,000,000 to get USDT.

Why does /walletsolidity show an older balance? It answers from the last confirmed block, about 20 blocks, or a minute, behind the newest one in our test.

Why do I see dozens of tokens in the trc20 list? Anyone can send tokens to any address. Only the entry keyed by TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t is USDT.

Rent energy

UsdtPull sends energy to your address for a set period. The transfer goes through without burning TRX, your keys stay with you and the energy returns on its own afterwards.

Energy rentalUSDT TRC-20
  1. Address and period

    In the app, you enter your wallet address, the amount of energy and the rental period.

  2. Energy on your address

    Energy lands on your address. The delegation is visible in the block explorer.

  3. No TRX burned

    The transfer uses the rented energy instead of your TRX. When the period ends, the energy returns on its own.

Related posts

  1. Guides

    TRON getaccountresource Explained: Every Field on Real Responses

    What each field of TRON getaccountresource means, checked on real TronGrid answers: free energy, EnergyLimit from staked TRX, recovery, getaccount fields.

    8 min
  2. Guides

    How to Validate a TRON Address: Format, Checksum and API Checks

    A TRON address is 34 Base58Check characters starting with T. How to check it offline in Node.js, what validateaddress returns, and how to spot a contract.

    8 min
  3. Guides

    How to Track a USDT TRC-20 Transaction by Hash on TronScan

    Find the TXID, open it in TronScan, read the result and confirmation, check that the token is real USDT and see the energy, bandwidth and TRX it cost.

    8 min