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

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

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

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

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

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

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

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

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

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

### Meta

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

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


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