# Etherlink Chain API
> Live on-chain data for Etherlink — a Tezos-secured EVM Layer 2 — via its public Blockscout explorer (no wallet, no key). The stats endpoint returns chain-wide totals (blocks, transactions, addresses, average block time, gas used); gas gives the current gas-price oracle (slow/average/fast). Blocks lists the latest blocks, and a single block resolves by height or by hash with its transaction count, gas, miner and timestamp. The address endpoint returns any account's XTZ balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in XTZ, fee, status and block. The token endpoint returns an ERC-20 token's metadata (name, symbol, decimals, total supply, holders) by contract address, and search runs a universal lookup across addresses, tokens, blocks and transactions. Gas, balances, values and fees are denominated in XTZ, the native coin. Real on-chain data straight from the explorer, refreshed every call — no key. 9 endpoints. For multi-chain coverage combine with the other oanor chain APIs (Ethereum, Base, Arbitrum and more).

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

## Pricing
- **Free** (Free) — 2,050 calls/Mo, 2 req/s
- **Basic** ($15/Mo) — 88,000 calls/Mo, 8 req/s
- **Pro** ($47/Mo) — 575,000 calls/Mo, 20 req/s
- **Mega** ($155/Mo) — 3,050,000 calls/Mo, 50 req/s

## Endpoints

### Chain

#### `GET /v1/gas` — Gas-price oracle

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

**Response:**
```json
{
    "data": {
        "fast": 0.97,
        "slow": 0.89,
        "unit": "gwei",
        "average": 0.89,
        "gas_used_today": "115935329126"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:51.068Z",
        "request_id": "1555b6d9-a690-41cd-8e52-b0c1479ef8a1"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Chain stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.97,
            "slow": 0.89,
            "average": 0.89
        },
        "total_blocks": 44816216,
        "coin_price_usd": 0.244018,
        "gas_used_today": "115935329126",
        "market_cap_usd": 265305183.360863,
        "total_addresses": "1595459",
        "total_transactions": "81027470",
        "transactions_today": "87656",
        "network_utilization_percent": 2.627264574783794e-7
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:51.188Z",
        "request_id": "f0e0de93-6aec-4a4b-aa0a-5209d08fd24f"
    },
    "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: `44811576`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xe9708a02527db1adfd28b32e7f277a6a079e682d705388c0aae4e45c167419dd",
            "size": 700,
            "miner": "0x3B1885eeC759C22C878E12C84FAC33B3B9D153E4",
            "height": 44811576,
            "gas_used": 2859390,
            "tx_count": 3,
            "gas_limit": 1125899906842624,
            "timestamp": "2026-06-08T04:56:14.000000Z",
            "burnt_fees": "2859390000000000",
            "difficulty": "0",
            "base_fee_per_gas": "1000000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:51.381Z",
        "request_id": "e209514a-d6df-4d7e-a96c-50d49ed3b736"
    },
    "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/etherlink-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x8712365cae1eed4714018714be9a27e9958641363742b01bf2191746c14fc9b8",
                "size": 600,
                "miner": "0x3B1885eeC759C22C878E12C84FAC33B3B9D153E4",
                "height": 44818726,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:49:49.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "1000000000"
            },
            {
                "hash": "0x7ff727a8d615d4ce2c48d8b91cbc32eac4e5632a1746987e99421db619b149a8",
                "size": 700,
                "miner": "0x3B1885eeC759C22C878E12C84FAC33B3B9D153E4",
                "height": 44818725,
                "gas_used": 2991241,
                "tx_count": 3,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:49:43.000000Z",
                "burnt_fees": "2991241000000000",
                "difficulty": "0",
                "base_fee_per_gas": "1000000000"
            },
            {
                "hash": "0xc100aab12acbf85125ed248863b1cf72ac1846f3b9e9da423baa4f8f665b229c",
                "size": 600,
                "miner": "0x3B1885eeC759C22C878E12C84FAC33B3B9D153E4",
                "height": 44818724,
                "gas_used": 0,
                "tx_count": 0,
                "gas_l
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Account balance & holdings

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0xEb8c75Dcc2632B63498f8e27251Fa58e280E9fbd",
            "name": null,
            "token": null,
            "creator": null,
            "balance_wei": "7685259000000000",
            "balance_xtz": 0.007685259,
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:52.005Z",
        "request_id": "a5a56bcb-916b-4714-8ae7-c9db4354c8a9"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x0c532e1e916219007f244e2d8Ef46f8530Ec75DE",
            "from": "0xEb8c75Dcc2632B63498f8e27251Fa58e280E9fbd",
            "hash": "0xbcaa7703b992e344bdf8a0628a4ac41d760d6806a7d6defc3a1a37e160ecf93d",
            "type": 2,
            "block": 44811576,
            "nonce": 4369,
            "method": "credit",
            "status": "ok",
            "fee_wei": "953130000000000",
            "fee_xtz": 0.00095313,
            "gas_used": 953130,
            "gas_price": "1000000000",
            "timestamp": "2026-06-08T04:56:14.000000Z",
            "value_wei": "0",
            "value_xtz": 0,
            "confirmations": 7151
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:52.973Z",
        "request_id": "298494ab-1f31-4402-836a-08654f0c16aa"
    },
    "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: `0x8ce7618E8f8E514d13889283F58FF03B794e6CC3`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/877/small/Chainlink_Logo_500.png?1760023405",
            "name": "Chainlink",
            "type": "ERC-20",
            "symbol": "LINK",
            "holders": null,
            "decimals": 18,
            "total_supply": "0",
            "exchange_rate_usd": 7.87,
            "circulating_market_cap": "5722412623.789632"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:53.126Z",
        "request_id": "8f64d583-cee9-48e1-a2fa-5fdb96d2629e"
    },
    "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: `LINK`

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

**Response:**
```json
{
    "data": {
        "count": 17,
        "query": "LINK",
        "results": [
            {
                "name": "Chainlink",
                "type": "token",
                "symbol": "LINK",
                "address": "0x8ce7618E8f8E514d13889283F58FF03B794e6CC3"
            },
            {
                "name": "Links Season 2: Alien Queen",
                "type": "token",
                "symbol": "LINK",
                "address": "0xc1688B79eF78273e0745bC07dd27AD26bdf98b33"
            },
            {
                "name": "Links Season 1: WoW",
                "type": "token",
                "symbol": "LINKSWOW",
                "address": "0x4fBa409eDCBc7Ba7cdD1ABF19a192A5057fd8718"
            },
            {
                "name": "Links",
                "type": "token",
                "symbol": "LINKS",
                "address": "0x2A7fdbF065dEBB099201330C471084BA22d625D2"
            },
            {
                "name": "LINKTOWN",
                "type": "token",
                "symbol": "LINK",
                "address": "0xd80f856A6F6cfa8CbdF1d02B6ea6b320486E9d16"
            },
            {
                "name": "Links Test",
                "type": "token",
                "symbol": null,
                "address": "0x0EE550c78D0F2ED4fE7729d5fEC85d48FEFf593f"
            },
            {
                "name": "LinkyAI",
                "type": "token",
                "symbol": "Linky",
                "address": "0x9ed3a97e0DEf3
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "etherlink-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 Etherlink 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. Etherlink is a Tezos EVM Layer 2; gas, balances and fees are in XTZ. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:53.632Z",
        "request_id": "9abd09fc-29f7-4a33-9c45-85fd5cc6f2bf"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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