Skip to main content

Get account

GEThttps://mainnet-aptos-api.moralis.io/accounts/: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
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'GET',
headers: {
accept: 'application/json',
'Bearer': 'YOUR_API_KEY'
},
};

fetch('https://mainnet-aptos-api.moralis.io/accounts/:address', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
{
"sequence_number": "32425224034",
"authentication_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}