# Aptos Modules API
> Inspect the Move smart-contract code published at any Aptos account, live from the official public Aptos fullnode REST API — no key. Where a resources endpoint shows an account's data, this shows its code: list the Move modules an account publishes, read any module's full ABI — its exposed functions with their visibility, entry and view flags, generic type parameters, parameter and return types, plus its struct definitions — and filter straight to the callable entry functions (state-changing transactions) and view functions (read-only queries) a dApp can invoke. The on-chain interface layer for Aptos wallets, explorers, SDK and binding generators, and security tooling that need to know exactly what a contract exposes before calling it. Reads straight from the chain; live, short cache only.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/aptosmodules-api/..."
```

## Pricing
- **Free** (Free) — 6,700 calls/Mo, 3 req/s
- **Starter** ($9/Mo) — 128,000 calls/Mo, 8 req/s
- **Pro** ($34/Mo) — 790,000 calls/Mo, 20 req/s
- **Business** ($97/Mo) — 4,950,000 calls/Mo, 50 req/s

## Endpoints

### Modules

#### `GET /v1/functions` — Callable functions of a module, filterable by kind

**Parameters:**
- `address` (query, required, string) — Aptos account address Example: `0x1`
- `name` (query, required, string) — Module name Example: `coin`
- `kind` (query, optional, string) — Filter: all, entry, view or public Example: `view`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosmodules-api/v1/functions?address=0x1&name=coin&kind=view"
```

**Response:**
```json
{
    "data": {
        "kind": "view",
        "note": "The module's callable functions, filtered by kind (entry = state-changing transactions, view = read-only queries). Each lists its parameter and return types.",
        "count": 15,
        "module": "coin",
        "source": "Aptos fullnode REST",
        "address": "0x1",
        "functions": [
            {
                "name": "name",
                "params": [],
                "return": [
                    "0x1::string::String"
                ],
                "is_view": true,
                "is_entry": false,
                "visibility": "public",
                "generic_type_params": 1
            },
            {
                "name": "symbol",
                "params": [],
                "return": [
                    "0x1::string::String"
                ],
                "is_view": true,
                "is_entry": false,
                "visibility": "public",
                "generic_type_params": 1
            },
            {
                "name": "decimals",
                "params": [],
                "return": [
                    "u8"
                ],
                "is_view": true,
                "is_entry": false,
                "visibility": "public",
                "generic_type_params": 1
            },
            {
                "name": "balance",
                "params": [
                    "address"
                ],
                "return": [
                
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/module` — Full ABI of one Move module: functions + structs

**Parameters:**
- `address` (query, required, string) — Aptos account address (0x1 or full address) Example: `0x1`
- `name` (query, required, string) — Module name Example: `coin`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosmodules-api/v1/module?address=0x1&name=coin"
```

**Response:**
```json
{
    "data": {
        "note": "Full ABI of the Move module: every exposed function with its visibility, entry/view flag, generic type params, parameters and return types, plus the module's struct definitions.",
        "module": "coin",
        "source": "Aptos fullnode REST",
        "address": "0x1",
        "friends": [
            "0x1::aptos_coin",
            "0x1::transaction_fee",
            "0x1::genesis"
        ],
        "structs": [
            {
                "name": "Deposit",
                "fields": [
                    {
                        "name": "account",
                        "type": "address"
                    },
                    {
                        "name": "amount",
                        "type": "u64"
                    }
                ],
                "is_event": true,
                "abilities": [
                    "drop",
                    "store"
                ],
                "is_native": false
            },
            {
                "name": "DepositEvent",
                "fields": [
                    {
                        "name": "amount",
                        "type": "u64"
                    }
                ],
                "is_event": false,
                "abilities": [
                    "drop",
                    "store"
                ],
                "is_native": false
            },
            {
                "name": "Withdraw",
                "fields": [
             
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/modules` — List the Move modules at an account with function/struct counts

**Parameters:**
- `address` (query, required, string) — Aptos account address Example: `0x1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosmodules-api/v1/modules?address=0x1"
```

**Response:**
```json
{
    "data": {
        "note": "Move modules published at this account. Each shows how many exposed functions (and how many are entry / view) and structs it has. Use /v1/module?name=<n> for the full ABI.",
        "count": 150,
        "source": "Aptos fullnode REST",
        "address": "0x1",
        "modules": [
            {
                "name": "account",
                "address": "0x1",
                "view_count": 9,
                "entry_count": 12,
                "struct_count": 16,
                "function_count": 38
            },
            {
                "name": "account_abstraction",
                "address": "0x1",
                "view_count": 3,
                "entry_count": 8,
                "struct_count": 5,
                "function_count": 12
            },
            {
                "name": "acl",
                "address": "0x1",
                "view_count": 0,
                "entry_count": 0,
                "struct_count": 1,
                "function_count": 5
            },
            {
                "name": "aggregator",
                "address": "0x1",
                "view_count": 0,
                "entry_count": 0,
                "struct_count": 1,
                "function_count": 5
            },
            {
                "name": "aggregator_factory",
                "address": "0x1",
                "view_count": 0,
                "entry_count": 0,
                "struct_count": 1,
                "function_co
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata & live sample

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosmodules-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "address": "0x1",
            "modules": 150
        },
        "source": "Aptos fullnode REST API (/accounts/{addr}/modules), keyless",
        "service": "aptosmodules-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/module": "Full ABI of one module: functions + structs (address=0x1, name=coin).",
            "GET /v1/modules": "List the Move modules at an account with function/struct counts (address=0x1).",
            "GET /v1/functions": "Callable functions of a module, filterable (address, name, kind=entry|view|public|all)."
        },
        "description": "Inspect the Move smart-contract code published at any Aptos account, live from the public Aptos fullnode REST API. List an account's modules, read any module's full ABI (exposed functions with visibility/entry/view/params/returns + structs), or filter to the callable entry and view functions. The on-chain interface layer for Aptos wallets, explorers and SDK generators. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:07.614Z",
        "request_id": "af9c5b62-83e7-49ac-8530-e78d9a447d66"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/aptosmodules-api
OpenAPI spec: https://www.oanor.com/api/aptosmodules-api/openapi.json
