/v1/accounts/{account_hash}/transactions - Aptos
Example code for the /v1/accounts/{account_hash}/transactions json-rpc method. Сomplete guide on how to use /v1/accounts/{account_hash}/transactions json-rpc in GetBlock.io Web3 documentation.
This endpoint gets the on-chain committed transactions associated with a specific account. This includes submitted, executed, or pending transactions where the account is the sender.
Supported Network
Mainnet
Parameters
Parameter
Data type
Description
Required
In
account_hash
string
Aptos account address
Yes
Path
start
string
The starting point or offset for retrieving resources. If not provided, defaults to showing the latest transactions
No
query
limit
integer
The maximum number of resources to retrieve per request. If not provided, defaults to default page size
No
query
Request
Base URL
https://go.getblock.io/<ACCESS_TOKEN>Example(cURl)
curl -X GET "https://go.getblock.io/<ACCESS_TOKEN>/v1/accounts/0xbf9239be9eb7e7a3d8e4c1f36083464fd47e6bd1f82a43b7c0f7ee958705a52f
/transactions?limit=5"Response
[
{
"version": "3574927316",
"hash": "0x01ef3543f79823b3a9fbc8acac9fba4bb25c7c1abb65f533caff2d9bcc0678f6",
"state_change_hash": "0x5cfb448ecb226172f3f5279d02658a645afdacf88a1ce308bf5b0717eca0c99e",
"event_root_hash": "0x63937d2f2e996f5c9e6cd669e518fdf7e474af4902a11501ec15dbb8d53e5ce9",
"state_checkpoint_hash": null,
"gas_used": "82",
"success": true,
"vm_status": "Executed successfully",
"accumulator_root_hash": "0x3d25cf24e802a777497da7f76fdeb05a472b30586f2171b82fbb72e1e3504609",
"changes": [
{
"address": "0xa",
"state_key_hash": "0x1db5441d8fa4229c5844f73fd66da4ad8176cb8793d8b3a7f6ca858722030043",
"data": {
"type": "0x1::coin::PairedCoinType",
"data": {
"type": {
"account_address": "0x1",
"module_name": "0x6170746f735f636f696e",
"struct_name": "0x4170746f73436f696e"
}
}
},
"type": "write_resource"
}
],
"sender": "0xbf9239be9eb7e7a3d8e4c1f36083464fd47e6bd1f82a43b7c0f7ee958705a52f",
"sequence_number": "871700",
"max_gas_amount": "200000",
"gas_unit_price": "100",
"expiration_timestamp_secs": "1760643271",
"payload": {
"function": "0x487e905f899ccb6d46fdaec56ba1e0c4cf119862a16c409904b8c78fab1f5e8a::router::swap",
"type_arguments": [],
"arguments": [
"0x82e0b52f95ae57b35220726a32c3415919389aa5b8baa33a058d7125797535cc01000000000000000000000000000000683e030100000000000000000000000000000000000000000000000000000000d093f60000000000000000000000000000000000000000000000000000000000"
],
"type": "entry_function_payload"
},
"signature": {
"public_key": "0x7df17b23676ef29e040847e64ae2a8351819d4bfaf64f3bfe2124d92156c1c02",
"signature": "0x8001b27ddb488c1ad5f4f6ed7fe4886b42528b0646a05685469b524b67cc6298192fa42d9af5ff2df1791c88f2f16dfdc22c8c1d5060795c68161a25ef335d01",
"type": "ed25519_signature"
},
"replay_protection_nonce": null,
"events": [
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0xa611a8ba7261ed1f4d3afe4ac2166fc9f3180103e3296772d593a1e2720c7405::stable::IncentiveSynced",
"data": {
"accumulated_rewards_per_share": "33902212381193",
"campaign_idx": "15",
"last_accumulation_time": "1760643255",
"last_total_shares": "4992836695498717952869616",
"pool_addr": "0x82e0b52f95ae57b35220726a32c3415919389aa5b8baa33a058d7125797535cc",
"total_distributed": "25151305402",
"ts": "1760643255618178"
}
},
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0xa611a8ba7261ed1f4d3afe4ac2166fc9f3180103e3296772d593a1e2720c7405::stable::Swapped",
"data": {
"bought_id": "0",
"buyer": "0xbf9239be9eb7e7a3d8e4c1f36083464fd47e6bd1f82a43b7c0f7ee958705a52f",
"pool_addr": "0x82e0b52f95ae57b35220726a32c3415919389aa5b8baa33a058d7125797535cc",
"sold_id": "1",
"stored_balances": [
"1990058935750",
"3042379974793"
],
"tokens_bought": "16980317",
"tokens_sold": "16989240",
"ts": "1760643255618178"
}
},
"timestamp": "1760643255618178",
"type": "user_transaction"
}
]Response Parameter Definition
Field
Type
Description
version
String
The transaction version (ledger sequence number).
hash
String
Unique hash of the transaction.
state_change_hash
String
Hash of all state changes caused by this transaction.
event_root_hash
String
Merkle root of events emitted in this transaction.
gas_used
String
Amount of gas consumed by the transaction.
success
Boolean
Whether the transaction executed successfully.
vm_status
String
Execution status from the Aptos VM.
accumulator_root_hash
String
Root hash of the transaction accumulator after applying this txn.
changes
Array
List of state changes caused by the transaction.
changes.address
String
Address whose resource was modified.
changes.state_key_hash
String
State key hash for the modified resource.
changes.type
String
Type of state change (e.g., write_resource).
changes.data
Object
Modified resource data.
changes.data.type
String
Type of resource (e.g., CoinStore<AptosCoin>).
changes.data.data
Object
Full contents of the updated resource (balance, events, frozen state, etc).
Use Cases
This method can be used for:
Get an account’s transaction history.
Build wallet activity feeds (incoming/outgoing transfers).
Build block explorers that show user-specific transactions.
Track failed vs successful transactions.
Code Example
Python Request
import requests
url = "https://go.getblock.io/<ACCESS_TOKEN>/v1/accounts/0xc20ea5a196c81d8d7aff814aa37f8a5823acffbc4193efd3b2aafc9ef2803255/transactions"
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Node(axios)
import axios from 'axios';
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://go.getblock.io/<ACCESS_TOKEN>/v1/accounts/0xc20ea5a196c81d8d7aff814aa37f8a5823acffbc4193efd3b2aafc9ef2803255/transactions',
headers: { }
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Error handling
Status Code
Error Message
Cause
403
Forbidden
Missing or invalid ACCESS_TOKEN.
404
Resource not found
The given resource type does not exist for this account.
500
Internal server error
Node or network issue. Retry later.
Integration with Web3
By integrating /v1/accounts/{account_hash}/transactions into developers can:
Build transaction history dashboards to show a user’s past on-chain actions.
Track when a user’s transaction is confirmed or fails.
dApps can fetch all transactions from an account for financial or legal reporting.
analyse user behaviour, token transfers, and contract interactions for dApps.
Last updated