Class TokenHoldingDataExtensions
Extension methods for querying token holding data from the mirror node.
Inherited Members
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class TokenHoldingDataExtensions
Methods
| Edit this page View SourceGetAccountTokenHoldingsAsync(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. |
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. |
| 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. |