2

I have a wallet address and token contracts

For example:

wallet address: tz1MmduNCzoKU9GHngwLqC8TmExTHQXJCSTn

and Tokens contracts:

Plenty: KT1GRSvLoikDsXujKgZPsGLX8k8VvR2Tq95b

Quipu: KT193D4vozYnhGJQVtw7CoxxqphqUEEwK6Vb

ecoin: KT1M81KrJr6TxYLkZkVqcpSTNKGoya8XytWT

Youves: KT1Xobej4mc6XgEjDoJoHtTKgbD1ELMvcQuL

Uno: KT1ErKVqEhG9jxXgUG2KGLW3bNM7zXHX8SD

kolibriUSD: KT1K9gCRgaLRFKTErYt1wVxA3Frb9FjasjTV

usdTz: KT1LN4LPSqTMS7Sd2CJw4bbDGRkMv2t68Fy9

Ctez: KT1SjXiUX63QvdNMcM2m492f7kuf8JxXRLp4

Dogami: KT1Ha4yFVeyzw6KRAdkzq6TxDHB97KG4pZe8

=============

I want to show the balance of every above contract with the help of a wallet address.

Is there any API to help me with this?

1 Answer 1

3

The best approach is to use an indexer that is aware of all tokens. Its not scalable to query them one at a time from the RPC, or to maintain the list of tokens.

This API from TZKT: https://api.tzkt.io/#operation/Tokens_GetTokenBalances

Only needs a wallet address, and will return balances for up to 10,000 tokens per page/request

2
  • How to filter just specific tokens balance?
    – Taleb
    Jun 17 at 13:04
  • @Taleb the link lists all the query parameters available. token.contract can be used to filter specific contract addresses
    – Simon McLoughlin
    Jun 17 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.