getAllBalances

abstract suspend fun getAllBalances(address: AccountAddress, limit: Int? = null, cursor: String? = null): Result<GetAllBalancesQuery.Data?, SuiError>

Fetches all coin balances for a given Sui address.

This method supports pagination to allow for fetching large sets of balances incrementally.

Return

A Result which is either:

  • Ok: Containing a nullable GetAllBalancesQuery.Data object. This object includes a list of balances and a nextCursor field for pagination.

  • Err: Containing a SuiError object with a list of GraphQLErrors.

Parameters

address

The AccountAddress of the account to query.

limit

An optional integer to specify the maximum number of balances to return per page.

cursor

An optional cursor string for pagination. Use the nextCursor from a previous response to fetch the next page of results.