hello. I am a newbie in algorand and I am trying to get the balance for the testnet. I have done some transactions by dispenser and i do have some amount in the testnet account. However, as I try to get the balance by let rawBalance = await reach.balanceOf(account.current), it shows an error as GET https://testnet.algoexplorerapi.io/v2/accounts/ZRVP5276H7PWMI5VIQVLFGICYEOAUVD467FJ2Z72UUGDETF6K7LXBRHQ4E net::ERR_FAILED
Does anyone know how to deal with this problem? Thank you
The endpoint https://testnet.algoexplorerapi.io is deprecated:
AlgoExplorer API v2
You need to use the new endpoints.
Note however that /v2/accounts
us no more supported by algoexplorer API.
You either need to use the indexer equivalent endpoint or use another API provider.
For example:
https://testnet-api.algonode.cloud/v2/accounts/ZRVP5276H7PWMI5VIQVLFGICYEOAUVD467FJ2Z72UUGDETF6K7LXBRHQ4E works
See https://algonode.io