Skip to main content

Get account module

GET

Returns the module 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
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.
module_namestringrequired
The name of the specific module to query.
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
bytecodestring
All byte (Vec) data is expressed as a hex-encoded string starting with 0x, with two hex digits per byte.Unlike the Address type, HexEncodedBytes does not omit any zeros.
A Move module
addressstringrequired
A 32-byte Aptos account address encoded in hexadecimal.When expressed as a string, it is a 64-character hexadecimal string. It may be abbreviated by omitting leading zeros and adding 0x prefix.For example, the address 0x0000000000000000000000000000000000000000000000000000000000000001 can be expressed as 0x1.
namestringrequired
friendsarrayrequired
Friends of the module
exposed_functionsarrayrequired
namestringrequired
is_nativebooleanrequired
is_eventboolean
Whether the struct is an event struct
is_enumboolean
Whether the struct is an enum
abilitiesarrayrequired
Ability associated with the Move struct
Generic type parameters associated with the Move function.
constraintsarrayrequired
The Move ability linked to the generic type parameter, associated with types that use this type.
namestringrequired
typestringrequired
String representation of the Move type tag exposed in the transaction payload.Values:
    Vector type value examples:
    • vector<u8>
    • vector<vector<u64>>
    • vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>
    Struct type value examples:
    • 0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
    • 0x1::account::Account
    Note:1. Whitespace should be ignored when comparing two struct tag ids.2. In URL paths, it must be encoded using url-encoding (AKA percent-encoding).
    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/module/fungible_asset' \
    -H 'Content-Type: application/json' \
    -H 'X-API-KEY: nodit-demo'