# Unit Zero Chain API
> Live on-chain data for Unit Zero — an EVM Layer 1 for real-world assets and AI compute — 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, validator and timestamp. The address endpoint returns any account's UNIT0 balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in UNIT0, 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 UNIT0, 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/unit0-api/..."
```

## Pricing
- **Free** (Free) — 6,000 calls/Mo, 2 req/s
- **Basic** ($36/Mo) — 164,000 calls/Mo, 8 req/s
- **Pro** ($109/Mo) — 890,000 calls/Mo, 20 req/s
- **Mega** ($365/Mo) — 5,150,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/unit0-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "12821840"
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:52.463Z",
        "request_id": "747ba76f-3f49-4e15-97c4-61cc9fb16928"
    },
    "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/unit0-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 11715216,
        "coin_price_usd": 0.008199509380537692,
        "gas_used_today": "12821840",
        "market_cap_usd": 41811.315410669304,
        "total_addresses": "2268124",
        "total_transactions": "4825679",
        "transactions_today": "112",
        "network_utilization_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:52.612Z",
        "request_id": "9001d263-519b-4133-8b3c-ae2a1162ec54"
    },
    "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: `11712242`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xf77ee36648b1935e6905ae7c8245f50e56a5903ea36c1e2e6af8d4dc69351e43",
            "size": 759,
            "miner": "0xEa39164B413b9ef65B3A7Fd9eDee08413Ee279B1",
            "height": 11712242,
            "gas_used": 150270,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T07:15:03.000000Z",
            "burnt_fees": "1051890",
            "difficulty": "0",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:52.776Z",
        "request_id": "e5008262-6e70-48b0-a0b4-6800781cb50c"
    },
    "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/unit0-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x0a53a2b8726544704f30bb4186684ecb413f1f1f118ee80fae9f9d754869fe49",
                "size": 607,
                "miner": "0xd65cF180721D31346aA4199dD110204287919507",
                "height": 11716343,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:48:47.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x1cb4b9afa9b7d7c24d2f1f85df01890e6ae5dd1de3e87baf0c56f0f877640486",
                "size": 607,
                "miner": "0xd65cF180721D31346aA4199dD110204287919507",
                "height": 11716342,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:48:45.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x9b316c796914b52b678f7bb872cd86e745c75bdf2a89e5750543937d9f70b0e3",
                "size": 607,
                "miner": "0xd65cF180721D31346aA4199dD110204287919507",
                "height": 11716341,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-
…(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: `0xd65cF180721D31346aA4199dD110204287919507`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xd65cF180721D31346aA4199dD110204287919507",
            "name": null,
            "token": null,
            "creator": null,
            "balance_wei": "14601798516196368220",
            "is_contract": false,
            "is_verified": false,
            "balance_unit0": 14.601798516196368
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:53.161Z",
        "request_id": "e562fe33-9c7e-4be4-8d86-9dc7213e590a"
    },
    "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: `0x38e4fe718bf2aa360fe49f25167d88d51004bd6ada314ab0e3439af2d93c943a`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x0000000000000000000000000000000000006A7e",
            "from": "0xd65cF180721D31346aA4199dD110204287919507",
            "hash": "0x38e4fe718bf2aa360fe49f25167d88d51004bd6ada314ab0e3439af2d93c943a",
            "type": 0,
            "block": 11712242,
            "nonce": 535,
            "method": "sendNative",
            "status": "ok",
            "fee_wei": "1202160",
            "gas_used": 150270,
            "fee_unit0": 1.20216e-12,
            "gas_price": "8",
            "timestamp": "2026-06-08T07:15:03.000000Z",
            "value_wei": "176402231480000000000",
            "value_unit0": 176.40223147999998,
            "confirmations": 4103
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:53.344Z",
        "request_id": "23bbf7f4-9e0b-4ea0-aa3f-7e99ea7d3305"
    },
    "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: `0xF252401108d869656Fa682e67B04AC9e9F4a388e`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Memma",
            "type": "ERC-20",
            "symbol": "Memma",
            "holders": null,
            "decimals": 18,
            "total_supply": "1000000000000000000000000000",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:53.458Z",
        "request_id": "e4bbb088-f731-4267-90a7-88b6d9a445ad"
    },
    "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: `Memma`

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

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "Memma",
        "results": [
            {
                "name": "Memma",
                "type": "token",
                "symbol": "Memma",
                "address": "0xF252401108d869656Fa682e67B04AC9e9F4a388e"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:53.564Z",
        "request_id": "4fd6c778-75ef-4e23-86ef-097d7342a845"
    },
    "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/unit0-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "unit0-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 Unit Zero 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. Unit Zero is an EVM Layer 1 for real-world assets; gas, balances and fees are in UNIT0. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:53.644Z",
        "request_id": "405f0275-5a9a-4c33-85e3-2406a258fed2"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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