get Account Transactions
open suspend override fun getAccountTransactions(accountAddress: AccountAddressInput, params: PaginationQueryParams.() -> Unit): Result<List<TransactionResponse>, AptosSdkError>
Queries for transactions submitted by a specific account.
This function automatically handles pagination, fetching the complete list of transactions across multiple API calls if necessary.
Usage
val address = AccountAddress.fromString("0x...")
val resolution = aptos.getAccountTransactions(address) {
limit = 25
}
when (resolution) {
is Result.Ok -> println("Successfully fetched ${resolution.value.size} transactions.")
is Result.Err -> println("Error fetching transactions: ${resolution.error.message}")
}Content copied to clipboard
Return
A Result which is either Ok containing the full list of TransactionResponses, or Err containing a categorized AptosSdkError.
Parameters
account Address
The address of the account to query.
params
A lambda to configure optional pagination parameters, such as limit and offset.