Skip to main content
Version: 2.2

Get account modules

GEThttps://mainnet-aptos-api.moralis.io/accounts/:address/modules

Get account modules for a given address.

PATH PARAMS
addressstringrequired
Address of account with or without a 0x prefix
QUERY PARAMS
ledger_versionstring

Ledger version to get state of account. If not provided, it will be the latest version

limitnumber

Max number of account resources to retrieve. If not provided, defaults to default page size.

startstring

Cursor specifying where to start for pagination This cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.

Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.accounts.getAccountModules({
"limit": 5,
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
[
{
"bytecode": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"abi": {
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"name": "",
"friends": [
""
],
"exposed_functions": [
{
"name": "",
"visibility": "private",
"is_entry": true,
"generic_type_params": [
{
"constraints": [
""
]
}
],
"params": [
""
],
"return": [
""
]
}
],
"structs": [
{
"name": "",
"is_native": true,
"abilities": [
""
],
"generic_type_params": [
{
"constraints": [
""
]
}
],
"fields": [
{
"name": "sender",
"type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>"
}
]
}
]
}
}
]