# Morph Chain API
> Real-time on-chain data for Morph (chain-id 2818), a consumer-focused Ethereum Layer-2 built on an optimistic-zkEVM hybrid rollup, where gas is paid in ETH. The status endpoint returns the chain id, network id, latest block height, native symbol and node client version so you can confirm the chain is live and synced. The block endpoint returns a block by decimal or 0x-hex height — or the latest block when no height is given — with its hash, parent hash, timestamp (raw and ISO), transaction count, gas used and limit, base fee and miner. The gas endpoint returns the current gas price in both wei and gwei at the latest block. The balance endpoint returns the native ETH balance (in wei and human-readable units) and the transaction count (nonce) for any 0x address. The meta endpoint documents the chain id, decimals and ecosystem. Reads a live Morph JSON-RPC node directly, so values are current to the latest block. Live, nothing stored. 5 endpoints. This serves native-coin and chain data; for ERC-20 token balances or contract calls use a dedicated token/contract API.

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

## Pricing
- **Free** (Free) — 280 calls/Mo, 2 req/s
- **Basic** ($13/Mo) — 22,600 calls/Mo, 5 req/s
- **Pro** ($34/Mo) — 118,000 calls/Mo, 20 req/s
- **Mega** ($75/Mo) — 520,000 calls/Mo, 60 req/s

## Endpoints

### Chain

#### `GET /v1/block` — Block by height or latest

**Parameters:**
- `number` (query, optional, string) — Block height (decimal or 0x-hex) or 'latest'. Omit for the latest block. Example: `5000000`

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

#### `GET /v1/gas` — Current gas price

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

#### `GET /v1/status` — Chain status

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

### Account

#### `GET /v1/balance` — Native ETH balance for an address

**Parameters:**
- `address` (query, required, string) — 0x-prefixed 40-hex EVM address Example: `0x000000000000000000000000000000000000dEaD`

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

### Meta

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

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


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