⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

accounts_get

Overview

Returns core account information (sequence number and authentication key) for a given address.

Endpoint

GET /v1/accounts/{address}

Aptos-Specific Notes

  • Accounts are resources; sequence numbers are required for building transactions.
  • Addresses are 0x-prefixed hex strings; leading zeros are accepted.

Request

Path Parameters

NameTypeRequiredDescription
addressstringYesAccount address (e.g., 0x1)

Query Parameters

None.

Request Body

None.

Response

Success Response (200)

{
"sequence_number": "string",
"authentication_key": "string"
}

Error Responses

StatusError CodeDescription
400invalid_inputInvalid address format
404account_not_foundAccount doesn't exist
500internal_errorServer error

Code Examples

cURL

curl -s "https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1/accounts/0x1" \
-H "Accept: application/json"

TypeScript SDK

import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
const aptos = new Aptos(new AptosConfig({ network: Network.MAINNET, fullnode: "https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1" }));
const account = await aptos.getAccountInfo({ accountAddress: "0x1" });

Python SDK

from aptos_sdk.client import RestClient
client = RestClient("https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1")
account = client.account("0x1")

Rust SDK

use aptos_sdk::rest_client::Client;
let client = Client::new("https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1".parse()?);
let account = client.get_account("0x1").await?;

Common Use Cases

  • Checking account existence before transactions
  • Retrieving authentication keys for verification
  • Getting sequence numbers for transaction building
  • accounts_resources - Get account resources
  • accounts_modules - Get account modules