Show / Hide Table of Contents

Class TokenBalanceDataExtensions

Extension methods for querying token balance data from the mirror node.

Inheritance
object
TokenBalanceDataExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class TokenBalanceDataExtensions

Methods

| Edit this page View Source

GetAccountTokenBalanceAsync(MirrorRestClient, EntityId, EntityId, params IMirrorQueryParameter[])

Retrieves the current balance of a specific fungible token held by an account, via /api/v1/accounts/{id}/tokens?token.id={token}. The token argument is pinned internally as a TokenFilter; callers do not need to supply one.

Declaration
public static Task<long?> GetAccountTokenBalanceAsync(this MirrorRestClient client, EntityId account, EntityId token, params IMirrorQueryParameter[] filters)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

EntityId account

The account whose holding is requested.

EntityId token

The token whose balance is requested.

IMirrorQueryParameter[] filters

Additional query parameters. The underlying endpoint supports PageLimit and OrderBy, though a single-token lookup rarely benefits from either.

Returns
Type Description
Task<long?>

The amount of token held by the target account, or null if the token has not been associated.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph