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

# Get account modules

`GET /accounts/{address}/modules`

This endpoint returns all account modules at a given address at a
specific ledger version (AKA transaction 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 (link).
If the requested data has been pruned, the server responds with a 404.

## Path parameters

- `address` string, hex, required — Hex encoded 32 byte Aptos account address

## Query parameters

- `ledger_version` string, uint64 — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatability 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
    - `address` string, hex, required — Hex encoded 32 byte Aptos account address
    - `name` string, required
    - `friends` MoveModuleId[], required
      - `address` string, hex, required — Hex encoded 32 byte Aptos account address
      - `name` string, required
    - `exposed_functions` MoveFunction[], required
      - `name` string, required
      - `visibility` 'private' | 'public' | 'friend', required
      - `is_entry` boolean, required
      - `generic_type_params` MoveFunctionGenericTypeParam[], required
        - `constraints` MoveAbility[], required
      - `params` MoveType[], required
      - `return` MoveType[], required
    - `structs` MoveStruct[], required
      - `name` string, required
      - `is_native` boolean, required
      - `abilities` MoveAbility[], required
      - `generic_type_params` MoveStructGenericTypeParam[], required
        - `constraints` MoveAbility[], required
        - `is_phantom` boolean, required
      - `fields` MoveStructField[], required
        - `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`
- `404`
- `500`

---

[API](https://skmtc.net/apscan/apis/aptos-node-api.md) · [All operations](https://skmtc.net/apscan/apis/aptos-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apscan/aptos-node-api/revisions/2953a57ebb77/schema)
