Documentation
Documentation
https://aptos.dev/en/build/apis/fullnode-rest-api
APIReference
https://api.mainnet.aptoslabs.com/v1/spec
Authentication
https://geomi.dev/docs/api-keys
openapi: 3.0.0
info:
title: Aptos Node Accounts API
description: The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
version: 1.2.0
contact:
name: Aptos Labs
url: https://github.com/aptos-labs/aptos-core
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: /v1
tags:
- name: Accounts
description: Access to accounts, resources, and modules
paths:
/accounts/{address}:
get:
tags:
- Accounts
summary: Get account
description: 'Return the authentication key and the sequence number for an account
address. Optionally, a ledger version can be specified. If the ledger
version is not specified in the request, the latest ledger version is used.'
parameters:
- name: address
schema:
$ref: '#/components/schemas/Address'
in: path
description: Address of account with or without a `0x` prefix
required: true
deprecated: false
explode: true
- name: ledger_version
schema:
$ref: '#/components/schemas/U64'
in: query
description: 'Ledger version to get state of account
If not provided, it will be the latest version'
required: false
deprecated: false
explode: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AccountData'
application/x-bcs:
schema:
type: array
items:
type: integer
format: uint8
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
required: true
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-CURSOR:
description: 'Cursor to be used for endpoints that support cursor-based
pagination. Pass this to the `start` field of the endpoint
on the next call to get the next page of results.'
deprecated: false
schema:
type: string
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'410':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'503':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
operationId: get_account
/accounts/{address}/resources:
get:
tags:
- Accounts
summary: Get account resources
description: 'Retrieves all account resources for a given account and a specific ledger version. If the
ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.'
parameters:
- name: address
schema:
$ref: '#/components/schemas/Address'
in: path
description: Address of account with or without a `0x` prefix
required: true
deprecated: false
explode: true
- name: ledger_version
schema:
$ref: '#/components/schemas/U64'
in: query
description: 'Ledger version to get state of account
If not provided, it will be the latest version'
required: false
deprecated: false
explode: true
- name: start
schema:
$ref: '#/components/schemas/StateKeyWrapper'
in: query
description: '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.'
required: false
deprecated: false
explode: true
- name: limit
schema:
type: integer
format: uint16
in: query
description: 'Max number of account resources to retrieve
If not provided, defaults to default page size.'
required: false
deprecated: false
explode: true
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/MoveResource'
application/x-bcs:
schema:
type: array
items:
type: integer
format: uint8
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
required: true
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
required: true
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-CURSOR:
description: 'Cursor to be used for endpoints that support cursor-based
pagination. Pass this to the `start` field of the endpoint
on the next call to get the next page of results.'
deprecated: false
schema:
type: string
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'410':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-TIMESTAMPUSEC:
description: Current timestamp of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-EPOCH:
description: Current epoch of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-BLOCK-HEIGHT:
description: Current block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-OLDEST-BLOCK-HEIGHT:
description: Oldest non-pruned block height of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-GAS-USED:
description: The cost of the call in terms of gas
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-TXN-ENCRYPTION-KEY:
description: Per-epoch transaction encryption key (hex-encoded)
deprecated: false
schema:
type: string
'503':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AptosError'
headers:
X-APTOS-CHAIN-ID:
description: Chain ID of the current chain
deprecated: false
schema:
type: integer
format: uint8
X-APTOS-LEDGER-VERSION:
description: Current ledger version of the chain
deprecated: false
schema:
type: integer
format: uint64
X-APTOS-LEDGER-OLDEST-VERSION:
description: Oldest non-pruned ledger version of the chain
deprecated: false
schema:
type: integer
# --- truncated at 32 KB (112 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aptos/refs/heads/main/openapi/aptos-accounts-api-openapi.yml