# 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"
```

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

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

### 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"
```

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

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

### 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"
```

### 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"
```

### 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"
```

### 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"
```

### Meta

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

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


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