GET
/
accounts
/
{address}
/
module
/
{module_name}
curl --request GET \
  --url https://aptos-mainnet.s.chainbase.online/{api-key}/v1/accounts/{address}/module/{module_name}
{
  "bytecode": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
  "abi": {
    "address": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
    "name": "<string>",
    "friends": [
      "0x1::aptos_coin"
    ],
    "exposed_functions": [
      {
        "name": "<string>",
        "visibility": "private",
        "is_entry": true,
        "generic_type_params": [
          {
            "constraints": [
              "<string>"
            ]
          }
        ],
        "params": [
          "<string>"
        ],
        "return": [
          "<string>"
        ]
      }
    ],
    "structs": [
      {
        "name": "<string>",
        "is_native": true,
        "abilities": [
          "<string>"
        ],
        "generic_type_params": [
          {
            "constraints": [
              "<string>"
            ]
          }
        ],
        "fields": [
          {
            "name": "<string>",
            "type": "<string>"
          }
        ]
      }
    ]
  }
}

Path Parameters

address
string
required

Address of account with or without a 0x prefix

Example:

"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"

module_name
string
required

Name of module to retrieve e.g. coin

Query Parameters

ledger_version
string

Ledger version to get state of account

If not provided, it will be the latest version

Example:

"32425224034"

Response

200
application/json

Move module bytecode along with it's ABI

bytecode
string
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.

Example:

"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"

abi
object

A Move module