# Energy Web Chain API
> Live on-chain data for Energy Web Chain — an EVM Layer 1 for energy-sector decentralised applications — 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, validator and timestamp. The address endpoint returns any account's EWT balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in EWT, 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 EWT, 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/energyweb-api/..."
```

## Pricing
- **Free** (Free) — 2,350 calls/Mo, 2 req/s
- **Basic** ($17/Mo) — 94,000 calls/Mo, 8 req/s
- **Pro** ($52/Mo) — 605,000 calls/Mo, 20 req/s
- **Mega** ($175/Mo) — 3,250,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/energyweb-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.08,
        "slow": 0.08,
        "unit": "gwei",
        "average": 0.08,
        "gas_used_today": "430822599"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:48.276Z",
        "request_id": "727f1081-eedd-4614-8c75-619c41cb8898"
    },
    "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/energyweb-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.08,
            "slow": 0.08,
            "average": 0.08
        },
        "total_blocks": 41256263,
        "coin_price_usd": 0.314242,
        "gas_used_today": "430822599",
        "market_cap_usd": 19025522.35239695,
        "total_addresses": "275115",
        "total_transactions": "96260559",
        "transactions_today": "11293",
        "network_utilization_percent": 0.39010637923113617
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:48.445Z",
        "request_id": "688c5532-0f46-4379-9df2-f412ec8ddccf"
    },
    "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: `41254767`
- `hash` (query, optional, string) — Block hash (alternative to height)

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xc09f705e146e92c4648f5386e1db9fd4306d3d7af630b561f9627c56806103da",
            "size": 751,
            "miner": "0xc56B672Afd3FAE873bf8A40bbE80f51075b187CA",
            "height": 41254767,
            "reward": "399123746012",
            "gas_used": 36284,
            "tx_count": 1,
            "gas_limit": 8000000,
            "timestamp": "2026-06-08T05:10:00.000000Z",
            "burnt_fees": "253988",
            "difficulty": "340282366920938463463374607431768211454",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:48.613Z",
        "request_id": "7d3da6ff-af1a-4ce4-a77c-b6b1f14dd651"
    },
    "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/energyweb-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x2a2578144d792cef409f844465b0099bd6466c44ff2e8851692e4cf3643d15d5",
                "size": 751,
                "miner": "0xc56B672Afd3FAE873bf8A40bbE80f51075b187CA",
                "height": 41257361,
                "reward": "399123746012",
                "gas_used": 36284,
                "tx_count": 1,
                "gas_limit": 8000000,
                "timestamp": "2026-06-08T09:49:45.000000Z",
                "burnt_fees": "253988",
                "difficulty": "340282366920938463463374607431768211454",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0xb82542ec22af6e1806ca8383875265d923cbaa50224f2a38f29eef83f3be3bfa",
                "size": 920,
                "miner": "0xdE15831ac319DAb5eAe5fD1FD9d52876c5E50F20",
                "height": 41257360,
                "reward": "7982479492024",
                "gas_used": 72568,
                "tx_count": 2,
                "gas_limit": 8000000,
                "timestamp": "2026-06-08T09:49:40.000000Z",
                "burnt_fees": "507976",
                "difficulty": "340282366920938463463374607431768211454",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0xdab920b154f4bc88a6a91eae5623f774b4df200f15dd24519cf96320d6e83cf8",
                "size": 563,
                "miner": "0x83329C3FD90D7Ee2eFD546e0dc6453e9172A0643"
…(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: `0x4c8FC2cAd90bEE5332E887d3c9184424E76b11E0`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x4c8FC2cAd90bEE5332E887d3c9184424E76b11E0",
            "name": null,
            "token": null,
            "creator": null,
            "balance_ewt": 5171.773997341735,
            "balance_wei": "5171773997341735214461",
            "is_contract": false,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:49.104Z",
        "request_id": "6595a7d2-73dc-47d8-838f-3ef90b45e839"
    },
    "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: `0x77e3a8debb3a7d18757f9408944807d029511f7db5aadf3be57df5ca8ae6dc3c`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x1204700000000000000000000000000000000000",
            "from": "0x4c8FC2cAd90bEE5332E887d3c9184424E76b11E0",
            "hash": "0x77e3a8debb3a7d18757f9408944807d029511f7db5aadf3be57df5ca8ae6dc3c",
            "type": 0,
            "block": 41254767,
            "nonce": 2100169,
            "method": "0xd69f13bb",
            "status": "ok",
            "fee_ewt": 3.99124e-7,
            "fee_wei": "399124000000",
            "gas_used": 36284,
            "gas_price": "11000000",
            "timestamp": "2026-06-08T05:10:00.000000Z",
            "value_ewt": 0,
            "value_wei": "0",
            "confirmations": 2595
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:49.263Z",
        "request_id": "1f02ab94-ba28-4662-a9ca-caa4cb326cd6"
    },
    "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: `0x7C6DdcC3DD33290fEb0C32023fa3e3Cd0BBdd36F`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Energy List",
            "type": "ERC-20",
            "symbol": "ELIST",
            "holders": null,
            "decimals": 18,
            "total_supply": "1000000000000000000000000000",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:49.387Z",
        "request_id": "19841bc3-b024-4945-9885-ebb45485666d"
    },
    "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: `ELIST`

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

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "ELIST",
        "results": [
            {
                "name": "Energy List",
                "type": "token",
                "symbol": "ELIST",
                "address": "0x7C6DdcC3DD33290fEb0C32023fa3e3Cd0BBdd36F"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:49.548Z",
        "request_id": "afbe58bf-a116-45b3-99d6-2d641c44f0a1"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "energyweb-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 Energy Web Chain 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. Energy Web Chain is an EVM Layer 1 for energy-sector dApps; gas, balances and fees are in EWT. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:49.635Z",
        "request_id": "3564749b-da68-40a5-a59e-34ad6a27284a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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