# Hemi API
> Live Hemi on-chain data via Blockscout. Hemi is a modular Layer 2 supernetwork powered by both Bitcoin and Ethereum; gas and balances are in ETH. Network stats, gas prices, latest blocks, a block by height or hash, address detail with ETH balance, a transaction by hash, ERC-20 token metadata and a universal search across addresses, tokens, blocks and transactions. Real data, no key.

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

## Pricing
- **Free** (Free) — 1,750 calls/Mo, 1 req/s
- **Basic** ($13/Mo) — 83,000 calls/Mo, 10 req/s
- **Pro** ($41/Mo) — 525,000 calls/Mo, 20 req/s
- **Mega** ($134/Mo) — 2,750,000 calls/Mo, 50 req/s

## Endpoints

### Network

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

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

#### `GET /v1/stats` — Network statistics

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

### Blocks

#### `GET /v1/block` — A block by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `4584979`
- `hash` (query, optional, string) — Block hash

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

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

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

### Accounts

#### `GET /v1/address` — Address detail with ETH balance

**Parameters:**
- `address` (query, required, string) — Address hash Example: `0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA`

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

### Transactions

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

**Parameters:**
- `hash` (query, required, string) — Transaction hash Example: `0x95dd7b65cb078820518152c8aa79918bab4e5c4a56c846c44f074b4deff3ca8f`

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

### Tokens

#### `GET /v1/token` — ERC-20 token metadata

**Parameters:**
- `address` (query, required, string) — Token contract address Example: `0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA`

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

### Search

#### `GET /v1/search` — Universal on-chain search

**Parameters:**
- `q` (query, required, string) — Address, token, block or tx Example: `USD`

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

### Meta

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

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


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