# Ergo On-Chain & Native Token API
> Live on-chain data from the Ergo (ERG) blockchain via the public Ergo Platform explorer — clean JSON, no cache. Ergo is a proof-of-work cryptocurrency built on the extended-UTXO (eUTXO) model with first-class native tokens, Sigma-protocol smart contracts and storage rent — a distinctly different design from account-based chains. Read the network head (best block height, mining difficulty, miner reward); browse the most recent blocks with their miner, size, difficulty and reward; fetch a single block by header id; look up any address's confirmed ERG balance and every native token it holds; or resolve a native token's id, name, decimals, emission amount and description. Read live from Ergo, nothing stored. This is Ergo's own extended-UTXO chain, native-token and Autolykos-PoW layer — distinct from the Bitcoin, Decred, EOS, Internet Computer and other on-chain APIs and from price feeds.

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

## Pricing
- **Free** (Free) — 1,000 calls/Mo, 3 req/s
- **Starter** ($11/Mo) — 36,000 calls/Mo, 12 req/s
- **Pro** ($29/Mo) — 185,000 calls/Mo, 30 req/s
- **Business** ($66/Mo) — 920,000 calls/Mo, 58 req/s

## Endpoints

### Network

#### `GET /v1/network` — Chain head — best block, difficulty, miner reward

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

### Blocks

#### `GET /v1/blocks` — Most recent blocks with miner, size, difficulty, reward

**Parameters:**
- `limit` (query, optional, string) — Number of blocks (1-50) Example: `10`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ergo-api/v1/blocks?limit=10"
```

### Block

#### `GET /v1/block` — A single block by header id

**Parameters:**
- `id` (query, required, string) — Block header id (64 hex) Example: `63359f6e2b35749e283540848927d3e67112c4e40e96169fd85aa0aa2967a2a2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ergo-api/v1/block?id=63359f6e2b35749e283540848927d3e67112c4e40e96169fd85aa0aa2967a2a2"
```

### Address

#### `GET /v1/address` — An address's confirmed ERG balance and native tokens held

**Parameters:**
- `address` (query, required, string) — Ergo address Example: `9gqhrGQN3eQmTFAW9J6KNX8ffUhe8BmTesE45b9nBmL7VJohhtY`

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

### Token

#### `GET /v1/token` — A native token's id, name, decimals, emission and description

**Parameters:**
- `id` (query, required, string) — Token id (64 hex) Example: `03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ergo-api/v1/token?id=03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04"
```

### Meta

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

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


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