# Aptos View API
> Execute read-only Move view functions on Aptos, live, via the official public Aptos fullnode REST API — no key. This is Aptos's equivalent of an eth_call: run any #[view] function against the current chain state and get its return value, without a transaction, gas or a signer. Call a function by its fully-qualified name (like 0x1::coin::balance) with type and value arguments, or use the convenience endpoints for any account's coin balance and a coin's total supply. Read any on-chain state a contract exposes — balances, configuration, prices, registry lookups, DeFi pool reserves — straight from the source. The on-chain read layer every Aptos wallet, dashboard, trading bot and indexer needs. Live from the chain; 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/aptosview-api/..."
```

## Pricing
- **Free** (Free) — 5,900 calls/Mo, 3 req/s
- **Starter** ($11/Mo) — 117,000 calls/Mo, 8 req/s
- **Pro** ($37/Mo) — 730,000 calls/Mo, 20 req/s
- **Business** ($104/Mo) — 4,650,000 calls/Mo, 50 req/s

## Endpoints

### View

#### `GET /v1/balance` — Coin balance of an address

**Parameters:**
- `address` (query, required, string) — Aptos account address Example: `0x1`
- `coin` (query, optional, string) — Coin type (defaults to APT) Example: `0x1::aptos_coin::AptosCoin`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosview-api/v1/balance?address=0x1&coin=0x1%3A%3Aaptos_coin%3A%3AAptosCoin"
```

**Response:**
```json
{
    "data": {
        "coin": "0x1::aptos_coin::AptosCoin",
        "note": "Coin balance from 0x1::coin::balance. balance is the raw integer (octas for APT); balance_apt is provided for APT (8 decimals).",
        "source": "Aptos fullnode REST /view",
        "address": "0x1",
        "balance": "11120868784",
        "balance_apt": 111.20868784
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:05.641Z",
        "request_id": "415a5ee1-e072-426c-8044-b85cfcf7597e"
    },
    "status": "ok",
    "message": "Balance retrieved successfully",
    "success": true
}
```

#### `GET /v1/supply` — Total supply of a coin

**Parameters:**
- `coin` (query, optional, string) — Coin type (defaults to APT) Example: `0x1::aptos_coin::AptosCoin`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosview-api/v1/supply?coin=0x1%3A%3Aaptos_coin%3A%3AAptosCoin"
```

**Response:**
```json
{
    "data": {
        "coin": "0x1::aptos_coin::AptosCoin",
        "note": "Total supply from 0x1::coin::supply (an Option — null when the coin tracks no aggregated supply). Raw integer.",
        "source": "Aptos fullnode REST /view",
        "supply": "120417204337589432"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:05.765Z",
        "request_id": "c6b112b8-10f6-4bdc-aa28-fcb3b2cc0a10"
    },
    "status": "ok",
    "message": "Supply retrieved successfully",
    "success": true
}
```

#### `GET /v1/view` — Call any Move view function (read-only, like eth_call)

**Parameters:**
- `function` (query, required, string) — Fully-qualified function (0x1::coin::balance) Example: `0x1::chain_id::get`
- `type_arguments` (query, optional, string) — Comma-separated Move type arguments
- `arguments` (query, optional, string) — Comma-separated value arguments (passed as strings)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/aptosview-api/v1/view?function=0x1%3A%3Achain_id%3A%3Aget"
```

**Response:**
```json
{
    "data": {
        "note": "Return value(s) of the Move #[view] function, executed read-only against current chain state (no transaction). Numeric arguments are passed as strings, as the Aptos API expects.",
        "result": [
            1
        ],
        "source": "Aptos fullnode REST /view",
        "function": "0x1::chain_id::get",
        "arguments": [],
        "type_arguments": []
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:05.884Z",
        "request_id": "4ad462d8-b8ab-4025-b46b-e36da52b7546"
    },
    "status": "ok",
    "message": "View call executed successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "sample": {
            "chain_id": 1
        },
        "source": "Aptos fullnode REST API (POST /view), keyless",
        "service": "aptosview-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/view": "Call any Move view function (function=0x1::coin::balance, type_arguments, arguments).",
            "GET /v1/supply": "Total supply of a coin (coin — defaults to APT).",
            "GET /v1/balance": "Coin balance of an address (address, coin — defaults to APT)."
        },
        "description": "Execute read-only Move view functions on Aptos, live via the public fullnode REST API — Aptos's equivalent of eth_call. Run any #[view] function with type and value arguments and get its return value, or use the convenience endpoints for a coin balance and total supply. The on-chain read layer for Aptos wallets, dashboards and bots. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:05.975Z",
        "request_id": "6825e667-1720-4ea6-b6af-af1df34feed5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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