# Ancient8 API
> Live Ancient8 on-chain data via Blockscout. Ancient8 is a gaming-focused Ethereum L2 built on the OP Stack; gas and balances are in ETH. Network stats, gas prices, latest blocks, a block by height or hash, address detail with ETH balance, a transaction by hash, ERC-20 token metadata and a universal search across addresses, tokens, blocks and transactions. Real data, no key.

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

## Pricing
- **Free** (Free) — 1,300 calls/Mo, 1 req/s
- **Basic** ($15/Mo) — 73,500 calls/Mo, 10 req/s
- **Pro** ($47/Mo) — 475,000 calls/Mo, 20 req/s
- **Mega** ($150/Mo) — 2,050,000 calls/Mo, 50 req/s

## Endpoints

### Network

#### `GET /v1/gas` — Current gas prices

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

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "2069752536"
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:14.035Z",
        "request_id": "e2f706b9-3837-4edd-84e2-bffa77ab59de"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 37442172,
        "coin_price_usd": null,
        "gas_used_today": "2069752536",
        "market_cap_usd": 0,
        "total_addresses": "2054984",
        "total_transactions": "45656917",
        "transactions_today": "43211",
        "network_utilization_percent": 0.16034986666666667
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:14.323Z",
        "request_id": "2312b381-ce80-4c8c-a305-1039538ddbd9"
    },
    "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: `37428884`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x626ce209ad10710e107639d34225775b5f5beaa79ef33989154046b7ed2ae0ff",
            "size": 907,
            "miner": "0x4200000000000000000000000000000000000011",
            "height": 37428884,
            "gas_used": 46206,
            "tx_count": 1,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T02:19:15.000000Z",
            "burnt_fees": "11643912",
            "difficulty": "0",
            "base_fee_per_gas": "252"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:14.627Z",
        "request_id": "8cb4ff38-db99-41dd-9595-b6581ea53a57"
    },
    "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/ancient8-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x5bd2cfbe999e70e4f752dc54147713a03dca2c93cce15e25b198321fd7109729",
                "size": 907,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 37442443,
                "gas_used": 46206,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:13.000000Z",
                "burnt_fees": "11643912",
                "difficulty": "0",
                "base_fee_per_gas": "252"
            },
            {
                "hash": "0x55353654637ad9cd04ebf2208827bedb169a2ddcf4eb3dc8e1d2decc91786bf3",
                "size": 907,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 37442442,
                "gas_used": 57394,
                "tx_count": 1,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:11.000000Z",
                "burnt_fees": "14463288",
                "difficulty": "0",
                "base_fee_per_gas": "252"
            },
            {
                "hash": "0xbf5d0411a3bc2e6e3166c12fe664ee6779af3775b2c34455c82798920104eae2",
                "size": 907,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 37442441,
                "gas_used": 46206,
                "tx_count": 1,
                "gas_limit": 30000000,
        
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Address detail with ETH balance

**Parameters:**
- `address` (query, required, string) — Address hash Example: `0x97423A68BAe94b5De52d767a17aBCc54c157c0E5`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5",
            "name": "TransparentUpgradeableProxy",
            "token": {
                "name": "USD Coin",
                "type": "ERC-20",
                "symbol": "USDC"
            },
            "creator": "0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba",
            "balance_eth": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:15.884Z",
        "request_id": "e07b8885-3319-40d6-a046-2c4568d1055d"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

**Parameters:**
- `hash` (query, required, string) — Transaction hash Example: `0x5db5f310532b5de81e0cc73d378b605278fd4e9980b9e6d3c9e5eab9ee5ef343`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x4200000000000000000000000000000000000015",
            "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
            "hash": "0x5db5f310532b5de81e0cc73d378b605278fd4e9980b9e6d3c9e5eab9ee5ef343",
            "type": 126,
            "block": 37428884,
            "nonce": 37428887,
            "method": "0x3db6be2b",
            "status": "ok",
            "fee_eth": 0,
            "fee_wei": "0",
            "gas_used": 46206,
            "gas_price": "0",
            "timestamp": "2026-06-08T02:19:15.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 13561
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:16.224Z",
        "request_id": "60372515-fbd8-4450-8247-82890b4631ce"
    },
    "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: `0x97423A68BAe94b5De52d767a17aBCc54c157c0E5`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "USD Coin",
            "type": "ERC-20",
            "symbol": "USDC",
            "holders": null,
            "decimals": 6,
            "total_supply": "5241300210",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:16.516Z",
        "request_id": "98c73a7d-0244-45d3-b531-82e4673ef393"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal on-chain search

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

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

**Response:**
```json
{
    "data": {
        "count": 6,
        "query": "USD",
        "results": [
            {
                "name": "USD Coin",
                "type": "token",
                "symbol": "USDC",
                "address": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5"
            },
            {
                "name": "USD Coin",
                "type": "token",
                "symbol": "USDC",
                "address": "0xB3fCcD379ad66CED0c91028520C64226611A48c9"
            },
            {
                "name": "USD Coin",
                "type": "token",
                "symbol": "USDC",
                "address": "0x2914926cbeB15ab4f97e99576B102123cb99e1dF"
            },
            {
                "name": "USD Coin",
                "type": "token",
                "symbol": "USDC",
                "address": "0xd8016e376e15b20Fc321a37fD69DC42cfDf951Bb"
            },
            {
                "name": "USD Coin",
                "type": "token",
                "symbol": "USDC",
                "address": "0xA73776c0aAE79382d8003B1fC7648B5ab32889D0"
            },
            {
                "name": "USD Coin",
                "type": "token",
                "symbol": "USDC",
                "address": "0x9fA986ACB22953c504Fcf5985DFA476d481C3b1B"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:16.805Z",
        "request_id": "da14db5c-5cce-4a17-8868-39745e62112c"
    },
    "status": "ok",
    "message": "Search resul
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "service": "ancient8-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 Ancient8 (L2) 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. Ancient8 is a gaming-focused Ethereum L2 (OP Stack); gas and balances are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:16.898Z",
        "request_id": "9280c3ce-46ef-49f0-ba8f-8f673a1cae5a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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