v2

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2022-07-19176455.9 KB
accounts
state

Get account resources

get/accounts/{address}/resources

Path parameters

addressstring address required

Hex-encoded 16 bytes Aptos account address.

Prefixed with 0x and leading zeros are trimmed.

See doc for more details.

Example:0xdd

Query parameters

versionstring uint64

The version of the latest transaction in the ledger.

Example:52635485

Response

This API returns account resources for a specific ledger version (AKA transaction version). If not present, the latest version is used.

The Aptos nodes prune account state history, via a configurable time window (link).

If the requested data has been pruned, the server responds with a 404

typestring move_type required

String representation of an on-chain Move struct type.

It is a combination of:

  1. Move module address, module name and struct name joined by ::.
  2. struct generic type parameters joined by , .

Examples:

  • 0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
  • 0x1::account::Account

Note:

  1. Empty chars should be ignored when comparing 2 struct tag ids.
  2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).

See doc for more details.

dataobject required

Account resource data is JSON representation of the Move struct type.

Move struct field name and value are serialized as object property name and value.

Example response

[
  {
    "type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
    "data": {
      "coin": {
        "value": "8000000000"
      }
    }
  }
]