Get account resources
GET
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.
⚠️ Notice regarding some API calls
As the latest version of the Aptos node client excludes the Legacy Indexer, Indexer-related errors may occur when making some API calls.
We are currently reviewing options to restore this functionality or provide alternative APIs, and will provide updates as related measures are completed.
We apologize for any inconvenience.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.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
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 valuesExamples: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<u8> is converted to a HexEncodedBytes string starting with 0x.
- 0x1::string::String: Converted to regular string.
codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Bad Request"}
cURL
curl -X GET 'https://aptos-mainnet.nodit.io/v1/accounts/0x1/resources?start=0000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000010d7374616b696e675f70726f7879' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo'