GETGet account resources

Retrieves all resources for a given account at the ledger version of a specific transaction. If no ledger version is specified, the latest ledger version is used. Aptos nodes prune account state history according to a configurable retention period. If the requested ledger version has been pruned, the server responds with a 410 status code.

Path Parameters
addressstringrequired

The address of the account to retrieve. Account addresses without the hexadecimal prefix can also be queried.

Query Parameters
ledger_versioninteger

The ledger version of the transaction to fetch account state from. If no value is provided, the latest version is used.

limitinteger

The maximum number of account modules to fetch. If no value is provided, the default page size is used.

startstring

A cursor that specifies the starting position for pagination.

This cursor cannot be arbitrarily generated on the client side. You must first call this endpoint without specifying this query parameter, then use the cursor returned in the X-Aptos-Cursor header of the response.

Responses
Headers
X-APTOS-BLOCK-HEIGHTintegerrequired

Current block height of the chain

예: 0

X-APTOS-CHAIN-IDintegerrequired

Chain ID of the current chain

예: 0

X-APTOS-EPOCHintegerrequired

Current epoch of the chain

예: 0

X-APTOS-LEDGER-OLDEST-VERSIONintegerrequired

Oldest unpruned ledger version of the chain

예: 0

X-APTOS-LEDGER-TIMESTAMPUSECintegerrequired

Current timestamp of the chain

예: 0

X-APTOS-LEDGER-VERSIONintegerrequired

Current ledger version of the chain

예: 0

X-APTOS-OLDEST-BLOCK-HEIGHTintegerrequired

Oldest unpruned block height of the chain

예: 0

X-APTOS-CURSORstring

Cursor for the next page

예: string

X-APTOS-GAS-USEDinteger

Amount of gas actually used for transaction execution

예: 0

Body
typestring

String representation of a Move struct tag. This type exists to allow MoveStructTag to be specified as a path or query parameter (e.g. used in get_events_by_event_handle). This value is composed of:

  1. move_module_address, module_name, struct_name joined by two colons (::)
  2. Generic type parameters of the struct specified as comma-separated values Examples:
  • 0x1::coin::CoinStore<0x1::aptos_coin::aptosCoin>
  • 0x1::account::Account
dataobject

Partial data from within an account resource, displayed in JSON representation. Specifically, a map with the top-level field keys of the given resource as keys and arbitrary JSON values/objects as values.

  • Move bool type: Converted to boolean.
  • u8~i32: Converted to integer.
  • u64~i256: Converted to string.
  • address: Converted to HexEncodedBytes string (e.g. 0x1).
  • Struct: Converted to object.
  • vector: Converted to array.
    • However, vector is converted to a HexEncodedBytes string starting with 0x.
  • 0x1::string::String: Converted to regular string.

예: [object Object]

X-API-KEY
RequestCU13
cURL
curl -X GET "https://aptos-mainnet.nodit.io/v1/accounts/0x1/resources?ledger_version=0&limit=0&start=0000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000010d7374616b696e675f70726f7879" \
  -H "X-API-KEY: {YOUR_API_KEY}"
Response
Header · 200
{
  "X-APTOS-BLOCK-HEIGHT": 0,
  "X-APTOS-CHAIN-ID": 0,
  "X-APTOS-EPOCH": 0,
  "X-APTOS-LEDGER-OLDEST-VERSION": 0,
  "X-APTOS-LEDGER-TIMESTAMPUSEC": 0,
  "X-APTOS-LEDGER-VERSION": 0,
  "X-APTOS-OLDEST-BLOCK-HEIGHT": 0,
  "X-APTOS-CURSOR": "string",
  "X-APTOS-GAS-USED": 0
}
Body · 200
[
  {
    "type": "0x1::account::Account",
    "data": {
      "authentication_key": "0xf92bc956b9e25f38a2e4829b58f03ca9724233985cdda3f818bc3e62d6ed7d9c",
      "coin_register_events": {
        "counter": "1",
        "guid": {
          "id": {
            "addr": "0xf92bc956b9e25f38a2e4829b58f03ca9724233985cdda3f818bc3e62d6ed7d9c",
            "creation_num": "0"
          }
        }
      },
      "guid_creation_num": "4",
      "key_rotation_events": {
        "counter": "0",
        "guid": {
          "id": {
            "addr": "0xf92bc956b9e25f38a2e4829b58f03ca9724233985cdda3f818bc3e62d6ed7d9c",
            "creation_num": "1"
          }
        }
      },
      "rotation_capability_offer": {
        "for": {
          "vec": []
        }
      },
      "sequence_number": "1645002",
      "signer_capability_offer": {
        "for": {
          "vec": []
        }
      }
    }
  },
  {
    "type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
    "data": {
      "coin": {
        "value": "1767711144"
      },
      "deposit_events": {
        "counter": "137",
        "guid": {
          "id": {
            "addr": "0xf92bc956b9e25f38a2e4829b58f03ca9724233985cdda3f818bc3e62d6ed7d9c",
            "creation_num": "2"
          }
        }
      },
      "frozen": false,
      "withdraw_events": {
        "counter": "13",
        "guid": {
          "id": {
            "addr": "0xf92bc956b9e25f38a2e4829b58f03ca9724233985cdda3f818bc3e62d6ed7d9c",
            "creation_num": "3"
          }
        }
      }
    }
  }
]