Token Information Deprecated
Sep 13, 2022
by Devin Saxon

In relation to HIP-367, this November, token information returned by getAccountInfo, getContractInfo and getAccountBalance are now deprecated.

With the current design, retrieval of tokens’ fields can lead to an excessive amount of calls. In order to retrieve the balance from tokenAssociations, for example, each tokenID in the array would need a separate map lookup. In return that getAccountBalance query would become extremely expensive.

For exchanges, wallets and dapp developers, users will need to use the mirror node rest API to access this information. The API is not ready for use today, but will be able to track the process of it’s development here.

The Hedera Mirror Node will also be updated to return hbar and token balances in real time.

Exchanges, wallets, and dapp developers will see the below fields no longer return data after the November mainnet release:

  • AccountInfo.tokenRelationships

  • AccountBalance.tokens

  • ContractInfo.tokenRelationships

The challenge with these queries is that they require numerous uncharged map look-ups to find and retrieve the token information; and when limits are removed, they may take an arbitrary amount of time to complete.

For this reason, and to maintain compatibility during the deprecation period, the call will continue to return at most 1000 (tokens.maxRelsPerInfoQuery) results. Should also note that mirror node accounts and REST APIs have been changed to the same 1000 limit of token balance information.

It is under strong recommendation to query this information from a mirror node in the future.

For any additional questions/feedback please submit here: