# Sui Modules API
> Inspect the Move smart-contract code published in any Sui package, live from a public Sui fullnode JSON-RPC — no key. Sui contracts are published as packages of Move modules; this reads their normalized ABI: list every module in a package, read a module's exposed functions (visibility, entry flag, type parameters with their abilities, parameter and return type tags) and struct definitions, or drill straight into a single function's signature. Unlike object- and coin-readers, this exposes the callable interface itself — exactly what a Sui package lets you do — the layer Sui wallets, explorers, programmable-transaction-block builders and SDK and binding generators need before they can construct a transaction. 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/suimodules-api/..."
```

## Pricing
- **Free** (Free) — 6,400 calls/Mo, 3 req/s
- **Starter** ($10/Mo) — 124,000 calls/Mo, 8 req/s
- **Pro** ($33/Mo) — 770,000 calls/Mo, 20 req/s
- **Business** ($91/Mo) — 4,850,000 calls/Mo, 50 req/s

## Endpoints

### Modules

#### `GET /v1/function` — A single Move function's normalized signature

**Parameters:**
- `package` (query, required, string) — Sui package address Example: `0x2`
- `module` (query, required, string) — Module name Example: `coin`
- `function` (query, required, string) — Function name Example: `value`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/suimodules-api/v1/function?package=0x2&module=coin&function=value"
```

**Response:**
```json
{
    "data": {
        "name": "value",
        "note": "A single Move function's normalized signature: visibility, entry flag, type parameters (with abilities), parameter type tags and return type tags.",
        "module": "coin",
        "return": [
            "U64"
        ],
        "source": "Sui fullnode JSON-RPC",
        "package": "0x2",
        "function": "value",
        "is_entry": false,
        "parameters": [
            {
                "Reference": {
                    "Struct": {
                        "name": "Coin",
                        "module": "coin",
                        "address": "0x2",
                        "typeArguments": [
                            {
                                "TypeParameter": 0
                            }
                        ]
                    }
                }
            }
        ],
        "visibility": "Public",
        "type_parameters": [
            {
                "abilities": []
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:06.230Z",
        "request_id": "40cc27a6-1af9-4a1a-aa40-3d0d4f9f6c9a"
    },
    "status": "ok",
    "message": "Function retrieved successfully",
    "success": true
}
```

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

**Parameters:**
- `package` (query, required, string) — Sui package address (0x2 or full address) Example: `0x2`
- `module` (query, required, string) — Module name Example: `coin`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/suimodules-api/v1/module?package=0x2&module=coin"
```

**Response:**
```json
{
    "data": {
        "note": "Normalized ABI of the Move module: exposed functions (visibility, entry flag, type parameters, parameter and return type tags) and struct definitions.",
        "module": "coin",
        "source": "Sui fullnode JSON-RPC",
        "friends": [
            {
                "name": "coin_registry",
                "address": "0x2"
            }
        ],
        "package": "0x2",
        "structs": [
            {
                "name": "Coin",
                "fields": [
                    {
                        "name": "id",
                        "type": {
                            "Struct": {
                                "name": "UID",
                                "module": "object",
                                "address": "0x2",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "name": "balance",
                        "type": {
                            "Struct": {
                                "name": "Balance",
                                "module": "balance",
                                "address": "0x2",
                                "typeArguments": [
                                    {
                                        "TypeParameter": 0
                                    }
                                ]
                            }
                        }
       
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/package` — List the Move modules in a package with function/struct counts

**Parameters:**
- `package` (query, required, string) — Sui package address Example: `0x2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/suimodules-api/v1/package?package=0x2"
```

**Response:**
```json
{
    "data": {
        "note": "Move modules published in this Sui package, each with its exposed-function and struct counts. Use /v1/module?module=<n> for a module's ABI.",
        "count": 65,
        "source": "Sui fullnode JSON-RPC",
        "modules": [
            {
                "name": "accumulator",
                "entry_count": 0,
                "public_count": 0,
                "struct_count": 3,
                "function_count": 17
            },
            {
                "name": "accumulator_metadata",
                "entry_count": 0,
                "public_count": 0,
                "struct_count": 5,
                "function_count": 0
            },
            {
                "name": "accumulator_settlement",
                "entry_count": 0,
                "public_count": 0,
                "struct_count": 1,
                "function_count": 0
            },
            {
                "name": "address",
                "entry_count": 0,
                "public_count": 9,
                "struct_count": 0,
                "function_count": 9
            },
            {
                "name": "address_alias",
                "entry_count": 4,
                "public_count": 0,
                "struct_count": 3,
                "function_count": 4
            },
            {
                "name": "authenticator_state",
                "entry_count": 0,
                "public_count": 0,
                "struct_count": 5,
                
…(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/suimodules-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "modules": 65,
            "package": "0x2"
        },
        "source": "public Sui fullnode JSON-RPC (sui_getNormalizedMoveModulesByPackage / ...Module / ...Function), keyless",
        "service": "suimodules-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/module": "Normalized ABI of one module: functions + structs (package=0x2, module=coin).",
            "GET /v1/package": "List the Move modules in a package with function/struct counts (package=0x2).",
            "GET /v1/function": "A single function's normalized signature (package=0x2, module=coin, function=value)."
        },
        "description": "Inspect the Move code published in any Sui package, live from a public Sui fullnode JSON-RPC. List a package's modules, read a module's normalized ABI (exposed functions with visibility/entry/type-params/params/returns + structs), or drill into a single function. The callable-interface layer for Sui wallets, explorers and SDK generators. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:06.989Z",
        "request_id": "426ec9bc-7dfd-4385-8825-858706a026e1"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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