Show / Hide Table of Contents

Class TokenHoldingDataExtensions

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

Inheritance
object
TokenHoldingDataExtensions
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 TokenHoldingDataExtensions

Methods

| Edit this page View Source

GetAccountTokenHoldingsAsync(MirrorRestClient, EntityId, params IMirrorQueryParameter[])

Enumerates the token-association records for a specific account from /api/v1/accounts/{id}/tokens, including both fungible tokens and NFT classes. Use TokenFilter to narrow to a specific token.

Declaration
public static IAsyncEnumerable<TokenHoldingData> GetAccountTokenHoldingsAsync(this MirrorRestClient client, EntityId account, params IMirrorQueryParameter[] filters)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

EntityId account

The account to retrieve the token holdings.

IMirrorQueryParameter[] filters

Additional query parameters. The endpoint supports TokenFilter, PageLimit, and OrderBy.

Returns
Type Description
IAsyncEnumerable<TokenHoldingData>

An async enumerable of the account's token holdings.

| Edit this page View Source

GetAccountTokenHoldingsAsync(MirrorRestClient, EntityId, CancellationToken, params IMirrorQueryParameter[])

Enumerates the token-association records for a specific account from /api/v1/accounts/{id}/tokens, including both fungible tokens and NFT classes. Use TokenFilter to narrow to a specific token.

Declaration
public static IAsyncEnumerable<TokenHoldingData> GetAccountTokenHoldingsAsync(this MirrorRestClient client, EntityId account, CancellationToken cancellationToken, params IMirrorQueryParameter[] filters)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

EntityId account

The account to retrieve the token holdings.

CancellationToken cancellationToken

Token that cancels the enumeration, including a page request in flight. WithCancellation on the result works as well.

IMirrorQueryParameter[] filters

Additional query parameters. The endpoint supports TokenFilter, PageLimit, and OrderBy.

Returns
Type Description
IAsyncEnumerable<TokenHoldingData>

An async enumerable of the account's token holdings.

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