# ZenChain API
> Live on-chain data for ZenChain mainnet (Horizen's EVM proof-of-stake Layer-1, native ZTC) via Blockscout — no key. Read network stats (block height, total transactions, gas), a gas oracle in gwei, the most recent blocks and full block detail by height or hash, any address balance and contract info, full transaction detail, ERC-20 token detail by contract, and a universal search across addresses, tokens, blocks and transactions. Real Layer-1 chain data with the rotating proxy as automatic fallback — 9 endpoints. Ideal for wallets, explorers, staking dashboards, portfolio trackers and on-chain monitoring on ZenChain.

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

## Pricing
- **Free** (Free) — 4,650 calls/Mo, 2 req/s
- **Basic** ($8/Mo) — 109,000 calls/Mo, 8 req/s
- **Pro** ($26/Mo) — 595,000 calls/Mo, 20 req/s
- **Mega** ($72/Mo) — 2,920,000 calls/Mo, 50 req/s

## Endpoints

### Network

#### `GET /v1/gas` — Gas oracle (gwei)

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

**Response:**
```json
{
    "data": {
        "fast": 0.45,
        "slow": 0.45,
        "unit": "gwei",
        "average": 0.45,
        "gas_used_today": "11888074"
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:52.715Z",
        "request_id": "98a129e1-4bc3-46d9-bcdb-c10f71b702aa"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Network stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.45,
            "slow": 0.45,
            "average": 0.45
        },
        "total_blocks": 8309080,
        "coin_price_usd": null,
        "gas_used_today": "11888074",
        "market_cap_usd": 0,
        "total_addresses": "7468112",
        "total_transactions": "57163436",
        "transactions_today": "190",
        "network_utilization_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:52.894Z",
        "request_id": "06b56ef5-511b-4368-bc32-30093c0455ea"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

#### `GET /v1/block` — Block detail by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `8305000`
- `hash` (query, optional, string) — Block hash (0x + 64 hex)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xca4534f8aa0f30dd0c6eb8f5f2389e7d2b3e85cb6b20b4aaa9fe74b2c6607a82",
            "size": 514,
            "miner": "0xc0b14552Ad9FD234FD4e9B77D25f76Ec0d889675",
            "height": 8305000,
            "gas_used": 0,
            "tx_count": 0,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T11:14:42.000000Z",
            "burnt_fees": "0",
            "difficulty": "0",
            "base_fee_per_gas": "500000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:53.078Z",
        "request_id": "d9f29bd3-c158-4386-936a-5570df800628"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — Most recent blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x74d86c17f88b9aa8abf3a5ba99dc01119e68dfd1ab9e33e0ac9a4dcb9fcb05c6",
                "size": 514,
                "miner": "0x46A148316EBA94539642f3fD6908dcAB10994D1A",
                "height": 8309290,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T18:25:54.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "500000000"
            },
            {
                "hash": "0x407741d62dcc9608e7cc3eabfe4a7052109d31268e60329b79b571529f01fa4b",
                "size": 514,
                "miner": "0x46A148316EBA94539642f3fD6908dcAB10994D1A",
                "height": 8309289,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T18:25:48.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "500000000"
            },
            {
                "hash": "0xfbb7e66f0cf973487fabc3f4e1ff1eb4d3110d5a63216b588c8cb371241c98d2",
                "size": 514,
                "miner": "0xc0b14552Ad9FD234FD4e9B77D25f76Ec0d889675",
                "height": 8309288,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 30000000,
                "timestam
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Address balance & contract info

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x67e29007BD3E2c3b368ec21c0259DAbC36C039D6",
            "name": null,
            "token": null,
            "creator": null,
            "balance_wei": "2481647415567479797980",
            "balance_ztc": 2481.64741556748,
            "is_contract": false,
            "is_verified": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:54.195Z",
        "request_id": "77f868b6-e4e6-4d55-983a-86788ab76453"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

#### `GET /v1/transaction` — Transaction detail

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x7798f2Eb73C1Dd8Fa8086d780D5CF114A10F528E",
            "from": "0x67e29007BD3E2c3b368ec21c0259DAbC36C039D6",
            "hash": "0xaef80fc1142f32afb0e48afb346382d6b7fb9218553c1b734dd069c6bde65a17",
            "type": 0,
            "block": 8305658,
            "nonce": 38,
            "method": "0x52eec2c6",
            "status": "ok",
            "fee_wei": "754466000000000",
            "fee_ztc": 0.000754466,
            "gas_used": 1508932,
            "gas_price": "500000000",
            "timestamp": "2026-06-08T12:20:48.000000Z",
            "value_wei": "5000000000000000000",
            "value_ztc": 5,
            "confirmations": 3633
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:55.014Z",
        "request_id": "f3963cc9-325d-4da9-bd44-177af15f5f3c"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

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

**Parameters:**
- `address` (query, required, string) — Token contract (0x + 40 hex) Example: `0x48230fA82fe21fc728a88CE382f970D97476B9EE`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "ZenX",
            "type": "ERC-20",
            "symbol": "ZNX",
            "address": "0x48230fA82fe21fc728a88CE382f970D97476B9EE",
            "holders": 130741,
            "decimals": 18,
            "total_supply": "10000000000000000000000000",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:55.182Z",
        "request_id": "20f017e8-a7b4-497f-902c-ea1a229a710a"
    },
    "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: `zen`

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "zen",
        "results": [
            {
                "name": "ZenX",
                "type": "token",
                "symbol": "ZNX",
                "address": "0x48230fA82fe21fc728a88CE382f970D97476B9EE"
            },
            {
                "name": "ZenChain Relic",
                "type": "token",
                "symbol": "ZCR",
                "address": "0xA254984ebb134bA918735B91DD05454A5962bC68"
            },
            {
                "name": "Community Member of ZenChain Testnet",
                "type": "token",
                "symbol": "CMZT",
                "address": "0x5a9525389B2c53c56BC3a2e4Fcdb4DC88326550d"
            },
            {
                "name": "Zen x OmniHub",
                "type": "token",
                "symbol": "ZXO",
                "address": "0x4E89fbfAc2fCcbD96f2D29961822F1e589b3C3ae"
            },
            {
                "name": "Zenchain USD Coin",
                "type": "token",
                "symbol": "zUSDC",
                "address": "0x44D25859F79787fF937ec1305Dbf0866d6064E21"
            },
            {
                "name": "Zenchain Ether",
                "type": "token",
                "symbol": "zETH",
                "address": "0x89F8267e9480Bbf7833D3A0Cfe98bDE70f96E1a0"
            },
            {
                "name": "Zenchain Bitcoin",
                "type": "token",
                "symbol": "zBTC",
                "addr
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "zenchain-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 & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live ZenChain (ZTC) mainnet on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:55.658Z",
        "request_id": "ff4a306a-b78a-490d-8244-2f2b639a8618"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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