GETGet account resource

Returns the resource for an account address. You can specify the ledger version of the transaction; if no ledger version is specified, the latest ledger version is returned. 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.

resource_typestringrequired

The type name of the target resource (struct) to retrieve.

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.

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/0x1::account::Account?ledger_version=0" \
  -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": "0xca62eccbbdb22b5de18165d0bdf2d7127569b91498f0a7f6944028793cef8137",
    "coin_register_events": {
      "counter": "1",
      "guid": {
        "id": {
          "addr": "0xca62eccbbdb22b5de18165d0bdf2d7127569b91498f0a7f6944028793cef8137",
          "creation_num": "0"
        }
      }
    },
    "guid_creation_num": "4",
    "key_rotation_events": {
      "counter": "0",
      "guid": {
        "id": {
          "addr": "0xca62eccbbdb22b5de18165d0bdf2d7127569b91498f0a7f6944028793cef8137",
          "creation_num": "1"
        }
      }
    },
    "rotation_capability_offer": {
      "for": {
        "vec": []
      }
    },
    "sequence_number": "2581041",
    "signer_capability_offer": {
      "for": {
        "vec": []
      }
    }
  }
}