---
title: "Get account modules"
method: GET
path: "/accounts/{address}/modules"
tags: ["Accounts"]
---

# Get account modules

`GET /accounts/{address}/modules`

## Request

- Base URL: `aptos-mainnet.nodereal.io/v1/{api_key}/v1` (relative, and the document’s source URL is not known)
- URL: `aptos-mainnet.nodereal.io/v1/{api_key}/v1/accounts/{address}/modules`
- Auth: none declared

Retrieves all account modules' bytecode for a given account at a specific ledger version.
If the ledger version is not specified in the request, the latest ledger version is used.

The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.

## Path parameters

- `address` string, hex, required: A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.

## Query parameters

- `ledger_version` string, uint64: A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

## Response `200`

- MoveModuleBytecode[]
  - `bytecode` string, hex, required: All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte. Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
  - `abi` MoveModule: A Move module
    - `address` string, hex, required: A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
    - `name` string, required
    - `friends` MoveModuleId[], required: Friends of the module
    - `exposed_functions` MoveFunction[], required: Public functions of the module
      - `name` string, required
      - `visibility` 'private' | 'public' | 'friend', required: Move function visibility
      - `is_entry` boolean, required: Whether the function can be called as an entry function directly in a transaction
      - `generic_type_params` MoveFunctionGenericTypeParam[], required: Generic type params associated with the Move function
        - `constraints` MoveAbility[], required: Move abilities tied to the generic type param and associated with the function that uses it
      - `params` MoveType[], required: Parameters associated with the move function
      - `return` MoveType[], required: Return type of the function
    - `structs` MoveStruct[], required: Structs of the module
      - `name` string, required
      - `is_native` boolean, required: Whether the struct is a native struct of Move
      - `abilities` MoveAbility[], required: Abilities associated with the struct
      - `generic_type_params` MoveStructGenericTypeParam[], required: Generic types associated with the struct
        - `constraints` MoveAbility[], required: Move abilities tied to the generic type param and associated with the type that uses it
      - `fields` MoveStructField[], required: Fields associated with the struct
        - `name` string, required
        - `type` string, required: String representation of an on-chain Move type tag that is exposed in transaction payload. Values: - bool - u8 - u64 - u128 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>` 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. 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).

## Other responses

- `400`
- `403`
- `404`
- `410`
- `500`
- `503`

---

[API](https://skmtc.dev/nodereal/apis/aptos-node-api.md) - [All operations](https://skmtc.dev/nodereal/apis/aptos-node-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nodereal/apis/aptos-node-api/revisions/46b3dead5102?raw)
