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

**Response:**
```json
{
    "data": {
        "chain": "ergo",
        "model": "extended UTXO (eUTXO)",
        "source": "Ergo Platform",
        "block_id": "e561e16ca01c0d19a116557b93f93c5791eceabd33ab400ce3ff3405157619bc",
        "tx_count": 4,
        "consensus": "Autolykos v2 PoW",
        "best_block": 1804874,
        "block_time": "2026-06-10T22:54:03.743Z",
        "difficulty": 101914591100928,
        "native_token": "ERG",
        "total_blocks": 1804874,
        "miner_reward_erg": 3
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:49.747Z",
        "request_id": "db80f0c8-8950-4921-8853-46c5171ad2cb"
    },
    "status": "ok",
    "message": "Network state retrieved successfully",
    "success": true
}
```

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

**Response:**
```json
{
    "data": {
        "count": 10,
        "blocks": [
            {
                "id": "e561e16ca01c0d19a116557b93f93c5791eceabd33ab400ce3ff3405157619bc",
                "epoch": 1762,
                "miner": "88dhgzEuTXaRQTX5KNdnaWTTX7fEZVEQRn6qP4MJotPuRnS3QpoJxYpSaXoU1y7SHp8ZXMp92TH22DBY",
                "height": 1804874,
                "tx_count": 4,
                "timestamp": "2026-06-10T22:54:03.743Z",
                "difficulty": 101914591100928,
                "miner_name": "2TH22DBY",
                "size_bytes": 38018,
                "miner_reward_erg": 3
            },
            {
                "id": "79cb6b8946a22d48de1d981d35691dcf5d96c242a958197100534a69919ce34a",
                "epoch": 1762,
                "miner": "88dhgzEuTXaSuf5QC1TJDgdxqJMQEQAM6YaTTRqmUDrmPoVky1b16WAK5zMrq3p2mYqpUNKCyi5CLS9V",
                "height": 1804873,
                "tx_count": 6,
                "timestamp": "2026-06-10T22:47:51.115Z",
                "difficulty": 101914591100928,
                "miner_name": "yi5CLS9V",
                "size_bytes": 37215,
                "miner_reward_erg": 3
            },
            {
                "id": "66cd716694e61fa9f8df43e8e34acccf53e860a8925f6087be94c3b3ea3cac32",
                "epoch": 1762,
                "miner": "88dhgzEuTXaRQTX5KNdnaWTTX7fEZVEQRn6qP4MJotPuRnS3QpoJxYpSaXoU1y7SHp8ZXMp92TH22DBY",
                "height": 1804872,
                "tx_count": 4,
                "timestamp": "2026-06-10T
…(truncated, see openapi.json for full schema)
```

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

**Response:**
```json
{
    "data": {
        "id": "63359f6e2b35749e283540848927d3e67112c4e40e96169fd85aa0aa2967a2a2",
        "height": 1804626,
        "source": "Ergo Platform",
        "version": 4,
        "miner_pk": null,
        "tx_count": 5,
        "parent_id": "c51d8214c03a5d8313ce7c3888dcdab52ea1874bd6a64284738415fa419d74f0",
        "timestamp": "2026-06-10T14:05:34.514Z",
        "difficulty": 110969137135616,
        "size_bytes": 42289
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:50.236Z",
        "request_id": "578a696b-3e22-41a1-9bec-987f1cc70444"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

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

**Response:**
```json
{
    "data": {
        "source": "Ergo Platform",
        "tokens": [
            {
                "name": "ClaimRSN.tech",
                "amount": 7105,
                "decimals": 1,
                "token_id": "31ac0f72b036502a17e27ff3bc9eb1b3ae4eef9aa4a3c3bd818475d6326cbd9f"
            },
            {
                "name": "🚬",
                "amount": 21069420,
                "decimals": 0,
                "token_id": "ebb40ecab7bb7d2a935024100806db04f44c62c33ae9756cf6fc4cb6b9aa2d12"
            },
            {
                "name": "ClaimRSN.tech",
                "amount": 3102,
                "decimals": 1,
                "token_id": "ed2197ebb2b958670cb568aeed54693617a3f3718d16d1a298b8c8d337193da0"
            },
            {
                "name": "rsHOSKY",
                "amount": 69420,
                "decimals": 0,
                "token_id": "6ad70cdbf928a2bdd397041a36a5c2490a35beb4d20eabb5666f004b103c7189"
            },
            {
                "name": "ClaimRSN.tech",
                "amount": 21025,
                "decimals": 1,
                "token_id": "028ec31acacaa6aab6cd89a16cab5f9046cfea701262f8c9532ace433075353a"
            },
            {
                "name": "$Lambo",
                "amount": 69,
                "decimals": 0,
                "token_id": "0fdb7ff8b37479b6eb7aab38d45af2cfeefabbefdc7eebc0348d25dd65bc2c91"
            },
            {
                "name": "COS",
                "amount": 1234321,
…(truncated, see openapi.json for full schema)
```

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

**Response:**
```json
{
    "data": {
        "name": "SigUSD",
        "type": "EIP-004",
        "box_id": "a49076f75e8446fec018d5d32cddf6e05575ef1273232e680f4cd5d716f4e78b",
        "source": "Ergo Platform",
        "decimals": 2,
        "token_id": "03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04",
        "description": "SigmaUSD - V2",
        "emission_amount": 10000000000001
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:52.922Z",
        "request_id": "df9afe76-2183-40a6-ae6c-0e59cd5164a2"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "model": "extended UTXO (eUTXO)",
        "source": "Ergo Platform explorer API (api.ergoplatform.com, live)",
        "service": "ergo-api",
        "consensus": "Autolykos v2 PoW",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/block": "A single block by header id (id=64 hex).",
            "GET /v1/token": "A native token's id, name, decimals, emission and description (id=64 hex).",
            "GET /v1/blocks": "Most recent blocks with miner, size, difficulty, reward (limit=10).",
            "GET /v1/address": "An address's confirmed ERG balance and native tokens held (address=...).",
            "GET /v1/network": "Chain head — best block, difficulty, miner reward."
        },
        "best_block": 1804874,
        "description": "Live on-chain data from the Ergo (ERG) blockchain via the public Ergo Platform explorer API. 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. The network endpoint returns the chain head (best block, difficulty, miner reward, latest block); the blocks endpoint returns the most recent blocks with miner, size, difficulty and reward; the block endpoint returns a single block by header id; the address endpoint returns an address's confirmed ERG balance and every native token it holds; the token endpoint returns a native token's id, name, decimals, emission amount and des
…(truncated, see openapi.json for full schema)
```


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