# Forma Chain API
> Live on-chain data for Forma — a Celestia-settled Layer 2 for NFTs and digital art — via its public Blockscout explorer (no wallet, no key). The stats endpoint returns chain-wide totals (blocks, transactions, addresses, average block time, gas used); gas gives the current gas-price oracle (slow/average/fast). Blocks lists the latest blocks, and a single block resolves by height or by hash with its transaction count, gas, miner and timestamp. The address endpoint returns any account's TIA balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in TIA, fee, status and block. The token endpoint returns an ERC-20 token's metadata (name, symbol, decimals, total supply, holders) by contract address, and search runs a universal lookup across addresses, tokens, blocks and transactions. Gas, balances, values and fees are denominated in TIA, the native coin. Real on-chain data straight from the explorer, refreshed every call — no key. 9 endpoints. For multi-chain coverage combine with the other oanor chain APIs (Ethereum, Base, Arbitrum and more).

## 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/forma-api/..."
```

## Pricing
- **Free** (Free) — 5,600 calls/Mo, 2 req/s
- **Basic** ($34/Mo) — 156,000 calls/Mo, 8 req/s
- **Pro** ($103/Mo) — 860,000 calls/Mo, 20 req/s
- **Mega** ($345/Mo) — 4,950,000 calls/Mo, 50 req/s

## Endpoints

### Chain

#### `GET /v1/gas` — Gas-price oracle

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

**Response:**
```json
{
    "data": {
        "fast": 16.75,
        "slow": 16.75,
        "unit": "gwei",
        "average": 16.75,
        "gas_used_today": "16992632"
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:56.497Z",
        "request_id": "24c0c97d-bf44-459f-ae57-bab21663ca11"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Chain stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 16.75,
            "slow": 16.75,
            "average": 16.75
        },
        "total_blocks": 28404255,
        "coin_price_usd": 0.465,
        "gas_used_today": "16992632",
        "market_cap_usd": 0,
        "total_addresses": "219467",
        "total_transactions": "1523143",
        "transactions_today": "503",
        "network_utilization_percent": 0.0014501333333333333
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:56.669Z",
        "request_id": "96526f1f-f093-4b6e-8ecb-41e15670d707"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

#### `GET /v1/block` — A block by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `28400682`
- `hash` (query, optional, string) — Block hash (alternative to height)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/forma-api/v1/block?height=28400682"
```

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xf03db97eaa7846edbf68f2c9a4e880e82e490d6b981c162dbd6a8127144ec043",
            "size": 778,
            "miner": "0xcc9Dc6b16775c097559a3817C1D4e64d5975C6D4",
            "height": 28400682,
            "gas_used": 21752,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T07:05:46.000000Z",
            "burnt_fees": "391536000000000",
            "difficulty": "0",
            "base_fee_per_gas": "18000000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:56.847Z",
        "request_id": "a7e12bd1-6e26-4309-9b69-45a001624859"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — Latest blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x6b55fbf0a23ed6b372edc177e1af75c83b590a19e53c0732992fca00adf044c8",
                "size": 620,
                "miner": "0xcc9Dc6b16775c097559a3817C1D4e64d5975C6D4",
                "height": 28405324,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:48:52.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "18000000000"
            },
            {
                "hash": "0xf044f45636ec286c2987127aee2f0ead6735136161e71796f2a157f15290f2d0",
                "size": 620,
                "miner": "0xcc9Dc6b16775c097559a3817C1D4e64d5975C6D4",
                "height": 28405323,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:48:50.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "18000000000"
            },
            {
                "hash": "0x9be3e49b3d4d8e93493b88e6970847eb87f32471f860152820641be3e7a530c0",
                "size": 620,
                "miner": "0xcc9Dc6b16775c097559a3817C1D4e64d5975C6D4",
                "height": 28405322,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "t
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Account balance & holdings

**Parameters:**
- `address` (query, required, string) — Account address (0x + 40 hex) Example: `0x7Ab14e7C0581cDA8B3168dD4A9058D49f2AFD027`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x7Ab14e7C0581cDA8B3168dD4A9058D49f2AFD027",
            "name": null,
            "token": null,
            "creator": null,
            "balance_tia": 18.584205206850275,
            "balance_wei": "18584205206850271648",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:57.276Z",
        "request_id": "a3950963-db94-46ae-a012-befffb3aff5a"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

#### `GET /v1/transaction` — A transaction by hash

**Parameters:**
- `hash` (query, required, string) — Transaction hash (0x + 64 hex) Example: `0x683c260d8d67b14da3b0e71cf0620470cccd5124d87ef188cd7c69acc7d25447`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/forma-api/v1/transaction?hash=0x683c260d8d67b14da3b0e71cf0620470cccd5124d87ef188cd7c69acc7d25447"
```

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x7Ab14e7C0581cDA8B3168dD4A9058D49f2AFD027",
            "from": "0x7Ab14e7C0581cDA8B3168dD4A9058D49f2AFD027",
            "hash": "0x683c260d8d67b14da3b0e71cf0620470cccd5124d87ef188cd7c69acc7d25447",
            "type": 0,
            "block": 28400682,
            "nonce": 112468,
            "method": null,
            "status": "ok",
            "fee_tia": 0.000475281200021752,
            "fee_wei": "475281200021752",
            "gas_used": 21752,
            "gas_price": "21850000001",
            "timestamp": "2026-06-08T07:05:46.000000Z",
            "value_tia": 0,
            "value_wei": "0",
            "confirmations": 4643
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:58.925Z",
        "request_id": "9093cf20-cae4-46b4-a0e8-6a7e874d2253"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

#### `GET /v1/token` — ERC-20 token metadata

**Parameters:**
- `address` (query, required, string) — Token contract address Example: `0xc1A9c67117127c859789c20c4042c0CD87325861`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Milo",
            "type": "ERC-721",
            "symbol": "MILO",
            "address": "0xc1A9c67117127c859789c20c4042c0CD87325861",
            "holders": 12788,
            "decimals": null,
            "total_supply": null,
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:59.106Z",
        "request_id": "a328533a-2268-48ac-9812-c1c70691d417"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal search

**Parameters:**
- `q` (query, required, string) — Address, token, block or tx Example: `MILO`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/forma-api/v1/search?q=MILO"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "MILO",
        "results": [
            {
                "name": "Milo",
                "type": "token",
                "symbol": "MILO",
                "address": "0xc1A9c67117127c859789c20c4042c0CD87325861"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:59.299Z",
        "request_id": "3daa851b-7aa1-485e-846c-8029049ff9e3"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "service": "forma-api",
        "endpoints": {
            "GET /v1/gas": "Gas oracle (slow/average/fast in gwei).",
            "GET /v1/meta": "This document.",
            "GET /v1/block": "Block detail by height= or hash=.",
            "GET /v1/stats": "Network stats (blocks, txns, coin price, market cap, gas).",
            "GET /v1/token": "ERC-20 token detail by contract (address=).",
            "GET /v1/blocks": "The most recent blocks.",
            "GET /v1/search": "Search addresses, tokens, blocks & txns (q=).",
            "GET /v1/address": "Address balance, ENS & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live Forma on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances with ENS, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. Forma is a Celestia-settled Layer 2 for NFTs and art; gas, balances and fees are in TIA. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:59.388Z",
        "request_id": "8ba114a2-d2b7-47f1-8611-73ce51d7b35e"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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