How to get token balance by address?

I am looking for a api to get token balance for chia wallet? Could you help me, please?

You could use the full node RPC query get_coin_records_by_puzzle_hash for single addresses or get_coin_records_by_puzzle_hashes for multiple addresses with the desired addresses’ puzzle hashes. If you just want the current balance, include "include_spent_coins": false in your request, then add up the amounts from the response.

1 Like