Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

Get account

🚨Aptos: Confirmed Deprecation (60 Days Notice)

Aptos mainnet and testnet will be discontinued on November 22nd, in line with the network’s deprecation of their v1 Indexers. We recommend exploring alternative providers, which you can find at Aptos APIs.

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

Get account information 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

Responses
API KEY
import Moralis from 'moralis';

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

const response = await Moralis.AptosApi.accounts.getAccount({
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
{
"sequence_number": "32425224034",
"authentication_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}